如何在android中对imageview应用多个旋转、平移、缩放动画

如何在android中对imageview应用多个旋转、平移、缩放动画,android,android-emulator,Android,Android Emulator,您好,我在这里做一个应用程序,当我的活动开始时,我需要先旋转图像,然后我需要将图像从顶部移动到中心,在那里我必须缩放图像一段时间后,我必须在imageview中查看图像,我尝试使用下面的代码,首先应用旋转动画,然后应用平移动画。2秒后,我应用缩放动画,但图像未在中心进行缩放,以获取imagview原始位置(顶部)这是缩放,但我需要在移动动画后缩放imageview在那个位置我需要缩放图像视图…任何人都可以建议如何将不同的动画应用到单个imageview public class A extend

您好,我在这里做一个应用程序,当我的活动开始时,我需要先旋转图像,然后我需要将图像从顶部移动到中心,在那里我必须缩放图像一段时间后,我必须在imageview中查看图像,我尝试使用下面的代码,首先应用旋转动画,然后应用平移动画。2秒后,我应用缩放动画,但图像未在中心进行缩放,以获取imagview原始位置(顶部)这是缩放,但我需要在移动动画后缩放imageview在那个位置我需要缩放图像视图…任何人都可以建议如何将不同的动画应用到单个imageview

public class A extends Activity{

TranslateAnimation moveLefttoRight1;
Animation logoMoveAnimation;
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
     setContentView(R.layout.game);

final ImageView myImage = (ImageView)findViewById(R.id.imageView1);

     //rotate animation
     final Animation myRotation = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.rotator);
        myImage.startAnimation(myRotation);


        //translate animation
        moveLefttoRight1 = new TranslateAnimation(0, 0, 0, 200);
        moveLefttoRight1.setDuration(2000);
        moveLefttoRight1.setFillAfter(true);
        myImage.startAnimation(moveLefttoRight1);

        //scale animation
      logoMoveAnimation = AnimationUtils.loadAnimation(this, R.anim.sacle); 
          Handler handler = new Handler();
            handler.postDelayed(new Runnable() {
                public void run() {

                    myImage.startAnimation(logoMoveAnimation);
                }
            }, 2000);


}
}

使用动画监听器

获取动画结束后,开始另一个动画

以供参考