android 幻灯片动画,Android 仿 PPT 进入动画效果合集

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:

6eb6a66df246c05cdd9e434cc289ca5d.gifc0df9888d30caafb86bd68ac0686e154.gif3.gifa7269590af011080313e8025db381249.gif1f9288a6b0261986c990f6f25e97cdc3.gifc6274389b62437c510b463e07e352065.gif7fe807cad82677538a10aba509c7a23f.gif21ac34b27ceef598a3a01d6ffd7215da.gif275bcb1b857055ac4d2beb71d9a53760.gif7280a398b08f72de0ab1ef16abf4bf52.gif69ec55d6eebe25c4d8a5b5e879882f2b.gifb28c80c89756290dc1c9bae0709fc041.gif7eb26f1a506b2cda37b68528facfc361.gif2013302ef6c69d572f678ee88be75e1c.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);

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值