Layout Animation
来源:互联网 发布:刘清华踮脚看航母 知乎 编辑:程序博客网 时间:2024/06/07 00:54
出处:http://www.imobilebbs.com/wordpress/?p=2063
本例显示ListView将从下到上(Reverse Order)显示列表项。本例的用法在Android ApiDemos示例解析(95):Views->Animation->3D Transition 已有说明:
看一下@anim/layout_bottom_to_top_slide” 的定义:
<layoutAnimation xmlns:android=”http://schemas.android.com/apk/res/android”
android:delay=”130%”
android:animationOrder=”reverse”
android:animation=”@anim/slide_right” />
对应LayoutAnimation 可以定义:
- delay: 定义每个子View开始动画延迟时间。
- animationOrder: 枚举Layout中子View的顺序,可以为normal (正序),reverse(倒序),random(随机顺序)。
- animation: 每个子View 所采用的动画效果,本例为@anim/slide_right,效果是文字从左到右移动。
- interpolator:帧插值算法,定义了动画的变化速率,动画的各帧的显示可以加速,减速,重复显示等。
@anim/slide_right 的定义如下:
<set xmlns:android=”http://schemas.android.com/apk/res/android”
android:interpolator=”@android:anim/accelerate_interpolator”>
<translate android:fromXDelta=”-100%p” android:toXDelta=”0″
android:duration=”1000″ />
< /set>
修改了一下duration 的值1 秒,使的更容易看到动画效果。
- Layout Animation
- layout animation
- 【Layout Animation 布局动画】
- 2C01-View-Layout-Animation-Grid-Fade
- 2C02-View-Layout-Animation-list-Cascade
- Android ApiDemos示例解析(129):Views->Layout Animation->4. Randomize
- 2C03-View-Layout-Animation-list-Reverse-Order
- Android0919<二十三>(ViewGroup、Animation、Animator、Layout Animations)
- Android ApiDemo学习(五)Animation—— 4 Default Layout Animation
- animation
- animation
- Animation
- Animation
- Animation
- Animation
- Animation
- Animation
- Animation
- c语言----文件的操作及应用(2)
- 网站性能测试webbench
- 4、给出一个函数复制两个字符串A和B,A的后几个和B的前几个字节重叠
- INNER JOIN
- UITableView 应用及其总结
- Layout Animation
- 说一下单元测试!
- Java程序员从笨鸟到菜鸟之(九十三)深入java虚拟机(二)——类的生命周期(上)类的加载和连接
- Hdu 3117 Fibonacci Numbers
- 打开eclipse时,An error has occurred. See the log file
- C#开发之访问Oracle数据库
- 我对android理解之jni
- 强力卸载内核模块
- AOP+memcached无侵入式集成