Android 仿 PPT 进入动画效果合集
EnterAnimationandroid 仿ppt进入动画效果合集,百叶窗效果,擦除效果,盒状效果,阶梯效果,菱形效果,轮子效果,劈裂效果,棋盘效果,
切入效果,扇形展开效果,十字扩展效果,随机线条效果,向内溶解效果,圆形扩展效果,
适用于各种view和viewgroup,activity即用于页面根部viewgroup,
自定义viewgroup自动换行layout,
看效果图
Series of entrance animation effects just like ppt in Android.
There are effects of Blinds,Wipe,Box,Strips,Diamond,Wheel,Split,Checkerboard,Peek In,Wedge,Plus,Random Bars,Dissolve In,Circle.
The Animation effects can apply to any View or ViewGroup.
There is also a custom ViewGroup of auto linefeed called SimpleLineWrapLayout to layout the buttons.
look the p_w_picpaths:
https://github.com/wangpeiming110/EnterAnimation/raw/master/p_w_picpath/1.gif https://github.com/wangpeiming110/EnterAnimation/raw/master/p_w_picpath/2.gif https://github.com/wangpeiming110/EnterAnimation/raw/master/p_w_picpath/3.gifhttps://github.com/wangpeiming110/EnterAnimation/raw/master/p_w_picpath/4.gif https://github.com/wangpeiming110/EnterAnimation/raw/master/p_w_picpath/5.gif https://github.com/wangpeiming110/EnterAnimation/raw/master/p_w_picpath/6.gifhttps://github.com/wangpeiming110/EnterAnimation/raw/master/p_w_picpath/7.gif https://github.com/wangpeiming110/EnterAnimation/raw/master/p_w_picpath/8.gif https://github.com/wangpeiming110/EnterAnimation/raw/master/p_w_picpath/9.gifhttps://github.com/wangpeiming110/EnterAnimation/raw/master/p_w_picpath/10.gif https://github.com/wangpeiming110/EnterAnimation/raw/master/p_w_picpath/11.gif https://github.com/wangpeiming110/EnterAnimation/raw/master/p_w_picpath/12.gifhttps://github.com/wangpeiming110/EnterAnimation/raw/master/p_w_picpath/13.gif https://github.com/wangpeiming110/EnterAnimation/raw/master/p_w_picpath/14.gifAttributesThere are several attributes you can set:
attr 属性description 描述isVisibleAtFirst进入页面时视图内容是否可见,默认可见How to use
layout:
在需要显示动画效果的 view 或 viewgroup 的外层包一个 EnterAnimLayout,然后在 java 中设置具体动画和控制开始播放动画;需要播放整个 activity 的话同理在最外层加一个 EnterAnimLayout,然后在 java 中设置具体动画和控制开始播放动画
<com.wangpm.enteranimation.EnterAnimLayout
android:id="@+id/anim_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:background="@android:color/holo_blue_bright"
android:padding="20dp"
>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@android:color/holo_orange_light">
<TextView
android:id="@+id/text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="EnterAnimTextView"
android:textSize="30sp"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/ic_launcher"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="这就是一个按钮"/>
</LinearLayout>
</LinearLayout>
</com.wangpm.enteranimation.EnterAnimLayout></pre><h4>java:</h4><pre class="brush:java;toolbar:false"> enterAnimLayout = (EnterAnimLayout)findViewById(R.id.anim_layout);
//oncreate中还并未获得view的具体尺寸,所以打开页面时延迟播放动画
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
//举例设置成百叶窗动画
Anim anim = new AnimBaiYeChuang(enterAnimLayout);
anim.startAnimation(2500);//开始播放动画,动画播放时长2500ms,默认2000
} }, 1000);
项目地址:
https://github.com/wangpeiming110/EnterAnimation
如果觉得对你有用,请在github上star一个,O(∩_∩)O谢谢
页:
[1]