文章导航
Android动画-概述
Drawable Animation使用方式
View Animation使用方式
Property Animation使用方式
概述
Drawable Animation是逐帧动画,就像GIF图片,通过一系列Drawable依次显示来模拟动画的效果,那么使用它之前必须先定义好各个帧。我们可以通过代码定义,也可以使用xml文件定义,一般使用后者`
动画定义
<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
android:oneshot="true">
<item android:drawable="@drawable/frame_1" android:duration="200" />
<item android:drawable="@drawable/frame_2" android:duration="200" />
<item android:drawable="@drawable/frame_3" android:duration="200" /