转于:http://www.cnblogs.com/622698abc/archive/2013/05/13/3074949.html

-------------------------------------------------------------------------------------------------------

LayoutAnimationsController

1、什么是LayoutAnimationsController

LayoutAnimationsController可以用于实现使多个控件按顺序一个一个的显示。

1)LayoutAnimationsController用于为一个layout里面的控件,或者是一个ViewGroup里面的控件设置统一的动画效果。

2)每一个控件都有相同的动画效果

3)控件的动画效果可以在不同的时间显示出来

4)LayoutAnimationsController可以在xml文件当中设置,以可以在代码当中进行设置。

2、在xml当中使用LayoutAnimationController

1)在res/anim文件夹下创建一个名为list_anim_layout.xml文件:

android:dylay -动画间隔时间;

android:animationOrder -动画执行的循序(normal:顺序,random:随机,reverse:反向显示)

android:animation –引用动画效果文件

<layoutAnimation   xmlns:android="http://schemas.android.com/apk/res/android"   android:delay="0.5"   android:animationOrder="normal"   android:animation="@anim/list_anim"/>

2)创建list_anim.xml文件,设置动画效果

复制代码
<?xmlversion="1.0"encoding="utf-8"?><setxmlns:android="http://schemas.android.com/apk/res/android"   android:interpolator="@android:anim/accelerate_interpolator"   android:shareInterpolator="true">   <alpha      android:fromAlpha="0.0"      android:toAlpha="1.0"      android:duration="1000"/></set>
复制代码

3)在布局文件main.xml当中为ListVIew添加如下配置

<ListView      android:id="@id/android:list"      android:layout_width="fill_parent"      android:layout_height="wrap_content"      android:scrollbars="vertical"      android:layoutAnimation="@anim/list_anim_layout"/>

更多相关文章

  1. android自定义按钮按下效果
  2. [Android UI界面] 怎样实现ListView分页效果?
  3. Android启动画面Splash
  4. Android创建逐帧动画的方式
  5. android 加载进度条动画
  6. Android PullToRefreshView巴黎埃菲尔铁塔效果
  7. Android UI - GridView长按实现拖拽效果
  8. Android 控件界面转成Bitmap

随机推荐

  1. Android学习心得——NeverLost
  2. Android整机调试串口新玩法
  3. Android动态修改ListView中指定Item的组
  4. Android(安卓)Studio--低版本如何不使用A
  5. Android(安卓)8.0 EditText 焦点无法移动
  6. Android中的对象序列化方法
  7. [Android] 基于 Linux 命令行构建 Androi
  8. Android获得线性渐变某点的颜色
  9. Android、iOS 将有Edge浏览器 Win10又一
  10. android ORM框架LitePal完全解析(crud)