80,472
社区成员




face=(ImageView) findViewById(R.id.image);
face.setImageResource(R.anim.animation_1);
animaition = (AnimationDrawable)face.getBackground();
animaition.setOneShot(false);
animaition.start();
<?xml version="1.0" encoding="utf-8"?>
<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
android:oneshot="false">
<item android:drawable="@drawable/smilies_1_2" android:duration="200" />
<item android:drawable="@drawable/smilies_1_2" android:duration="200" />
<item android:drawable="@drawable/smilies_1_3" android:duration="200" />
<item android:drawable="@drawable/smilies_1_4" android:duration="200" />
<item android:drawable="@drawable/smilies_1_5" android:duration="200" />
</animation-list>