我试图让动画在另一个动画结束后运行,在几个论坛中我找到了相同的答案,使用setAnimationListener,但我一直得到找不到符号错误,有什么不对?
public class Juego extends Activity
{
private AnimationDrawable animacion, loop;
private MediaPlayer miPlayer;
private int order = 1;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_juego);
ImageView video = (ImageView)findViewById(R.id.secuencia);
video.setBackgroundResource(R.drawable.animation_drawable_start);
animacion = (AnimationDrawable)video.getBackground();
animacion.start();
animacion.setAnimationListener(new AnimationListener() {
@Override
public void onAnimationStart(Animation animation) {
}
@Override
public void onAnimationRepeat(Animation animation) {
}
@Override
public void onAnimationEnd(Animation animation) {
}
});
}
答案 0 :(得分:3)