EnterAnimation

android 仿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 images:

1.gifda93dd955716f4f663854a0b606eadcd.gif3.gif

9b30d2640bb50854accb4e6cba16475f.gifb16b6fc1f71a01b751e16ff1982ef6da.gif6.gif

5e3082056adc2230e71a70a1bbea1e52.gif8.gifca0b874dd1908c2e7ab7f1437a88387b.gif

d5e088d283bef92e0b3d366e70584a81.gifd7f2d95ec210eb697be1953a507f90c1.gif12.gif

13.gif23c45c49f62b910002fdfbbf49ac7b36.gif

Attributes

There are several attributes you can set:

attr 属性

description 描述

isVisibleAtFirst

进入页面时视图内容是否可见,默认可见

How to use

layout:

在需要显示动画效果的view或viewgroup的外层包一个EnterAnimLayout,然后在java中设置具体动画和控制开始播放动画;需要播放整个activity的话同理在最外层加一个EnterAnimLayout,然后在java中设置具体动画和控制开始播放动画

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"

>

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:orientation="vertical"

android:background="@android:color/holo_orange_light">

android:id="@+id/text_view"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="EnterAnimTextView"

android:textSize="30sp"

/>

android:layout_width="match_parent"

android:layout_height="match_parent"

android:orientation="horizontal">

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:src="@mipmap/ic_launcher"

/>

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="这就是一个按钮"/>

java:

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);

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐