图片自动切换
res/drawable/update.xml
res/layout/xx.xml
res/drawable/update.xml
<animation-list
xmlns:android="http://schemas.android.com/apk/res/android"
android:oneshot="false">
<item android:drawable="@drawable/update_1" android:duration="200" />
<item android:drawable="@drawable/update_2" android:duration="200" />
<item android:drawable="@drawable/update_3" android:duration="200" />
<item android:drawable="@drawable/update_4" android:duration="200" />
<item android:drawable="@drawable/update_5" android:duration="200" />
<item android:drawable="@drawable/update_6" android:duration="200" />
<item android:drawable="@drawable/update_7" android:duration="200" />
</animation-list>
res/layout/xx.xml
<com.android.server.status.AnimatedImageView android:layout_marginTop="10dp"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:layout_weight="1" android:src="@drawable/update"/>
本文介绍了一种使用Android的animation-list实现图片自动切换的方法。通过定义不同的帧间隔和图片资源,可以轻松创建连续的动画效果。
4153

被折叠的 条评论
为什么被折叠?



