I am using following code for rotating an image
RotateAnimation anim1 = new RotateAnimation(0, 360, 8, 70);
anim1.setRepeatCount(0);
anim1.setDuration(18000);
anim1.setFillAfter(true);
img7.startAnimation(anim1);
After that I am using another animation
RotateAnimation anim1 = new RotateAnimation(360, 0, 8, 70);
anim1.setRepeatCount(0);
anim1.setDuration(18000);
anim1.setFil开发者_JS百科lAfter(true);
img7.startAnimation(anim1);
When I am using both the animations without any action listener one of them will work....What I actually want, is at the end of the first animation, for the second animation to start...Can anybody help me to do this?
I am not using any XML code for animation.
Why won't you use Animation.AnimationListener for the first animation (setAnimationListener()) and launch the second when the first one finishes?
I think AnimatorSet was designed for this. Demo in the sdk.
精彩评论