Drawable animation可以加载Drawable资源实现帧动画。AnimationDrawable是实现Drawable animations的基本类。这里用AnimationDrawable 简单模拟动态图的实现。 fragment_main 布局文件 ---- ...
Drawable animation可以加载Drawable资源实现帧动画。AnimationDrawable是实现Drawable animations的基本类。
这里用AnimationDrawable 简单模拟动态图的实现。
fragment_main 布局文件 ---- 只需要放一个 ImageView即可
1 <RelativeLayout ="http://schemas.android.com/apk/res/android" 2 ="http://schemas.android.com/tools" 3 android:layout_width="match_parent" 4 android:layout_height="match_parent" 5 tools:context="com.yztc.frameanimation.MainActivity" > 6 7 <ImageView 8 android:id="@+id/iv_frame" 9 android:layout_width="match_parent"10 android:layout_height="200dp"11 android:background="@drawable/girl_and_boy" />12 13 </RelativeLayout>
原标题:Android之AnimationDrawable初识
关键词:Android
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。