动画库
来源:互联网 发布:java equal的用法 编辑:程序博客网 时间:2024/05/16 10:27
我用过的动画
ListView
方式一、静态添加(可以复用)
① 在 anim文件夹创建 item动画:item_anim.xml,即每一条数据载入时的动画
<?xml version="1.0" encoding="utf-8"?><set xmlns:android="http://schemas.android.com/apk/res/android" android:fillAfter="true"> <translate android:fromXDelta="100%" android:toXDelta="0" android:fromYDelta="0" android:toYDelta="0" android:duration="88" /> <alpha android:fromAlpha="0.1" android:toAlpha="1" android:duration="238" /></set>
② 创建动画文件:listview_animation.xml ,注意根元素是LayoutAnimation
<?xml version="1.0" encoding="utf-8"?><layoutAnimation xmlns:android="http://schemas.android.com/apk/res/android" android:delay="18%" android:animationOrder="normal" android:animation="@anim/item_anim" />
③ 在布局文件中,为ListView控件添加LayoutAnimation属性并设值
android:layoutAnimation="@anim/listview_animation"
方式二、代码中添加
① 同上,创建item动画:item_anim.xml
② 在代码中创建Layout 动画,并为ListView 对象设置
LayoutAnimationController listViewAnim = new LayoutAnimationController( AnimationUtils.loadAnimation(this, R.anim.item_anim)); listViewAnim.setDelay(0.2f); listViewAnim.setOrder(LayoutAnimationController.ORDER_NORMAL); listView.setLayoutAnimation(listViewAnim);
0 0
- 动画库
- css3常用动画+动画库
- ss3常用动画+动画库
- js匀速动画及动画库
- 动画库 CPAnimationSequence
- Lemon动画库介绍
- android动画库
- Android动画库
- android加载动画库
- WoWoViewPager动画库
- css3动画库
- css3动画库
- NineOldAndroids动画库
- android动画库
- IOS动画库汇总
- 强大的动画库
- Vivify动画库
- 动画
- 3、vuejs数据绑定
- 互联网网站的反爬虫策略浅析
- 用python生成验证码图片
- android ListView和GridView拖拽移位实现代码
- 1/28
- 动画库
- 蓝桥杯--历届试题 兰顿蚂蚁 (模拟)
- Android中Animation 详细解读
- GridView多选效果的实例代码
- 友情链接
- Maven 标准目录结构
- map
- linux初体验
- ActivityGroup+GridView实现Tab分页标签的方法