我想制作一个动画,但能够按照我想要的次数播放它.现在它只是第一次播放.
android:id="@+id/p1_ch1" android:oneshot="true">
android:drawable="@drawable/p1_ch1_5"
android:duration="500"/>
android:drawable="@drawable/p1_ch1_4"
android:duration="1000"/>
android:drawable="@drawable/p1_ch1_5"
android:duration="500"/>
的.java:
public void handler_p1_ch1_5 (View target){
ImageView iv = (ImageView)findViewById(R.id.p1_ch1_5);
AnimationDrawable aw = (AnimationDrawable)iv.getBackground();
aw.start();
}