You can use AnimationListener to monitor the running process of Animation.
[Java]
AnimationSet as = new AnimationSet (true );
RotateAnimation al = new RotateAnimation (0,-720, Animation. RELATIVE_TO_PARENT, 0.5f, Animation. RELATIVE_TO_PARENT, 0.5f );
Al. setDuration (3000 );
Al. setAnimationListener (new AnimationListener (){
Public void onAnimationStart (Animation animation ){
// TODO Auto-generated method stub
}
Public void onAnimationEnd (Animation animation ){
// TODO Auto-generated method stub
}
Public void onAnimationRepeat (Animation animation ){
// TODO Auto-generated method stub
}
});
As. addAnimation (al );
Iv. startAnimation ();
AnimationSet as = new AnimationSet (true );
RotateAnimation al = new RotateAnimation (0,-720, Animation. RELATIVE_TO_PARENT, 0.5f, Animation. RELATIVE_TO_PARENT, 0.5f );
Al. setDuration (3000 );
Al. setAnimationListener (new AnimationListener (){
Public void onAnimationStart (Animation animation ){
// TODO Auto-generated method stub
}
Public void onAnimationEnd (Animation animation ){
// TODO Auto-generated method stub
}
Public void onAnimationRepeat (Animation animation ){
// TODO Auto-generated method stub
}
});
As. addAnimation (al );
Iv. startAnimation (as); three methods are called at the beginning of Animation, when completed, and when repeated.