I have an ImageView on which I applied rotation animation. Since I want the rotation to continue continuously, I gave repeatCount as infinite in my rotate.xml:
android:repeatCount="infinite"
In onCreate (), load the animation and run it.
Animation myAnim = AnimationUtils.loadAnimation(this, R.anim.rotate); objectImg.startAnimation(myAnim);
When the button is pressed, rotation should stop. Therefore, in my onClick (), I called clearAnimation ().
objectImg.startAnimation(myAnim);
My simple question is whether to stop the animation. I suppose clearAnimation () corresponds to loadAnimation (), but there is no stopAnimation () which corresponds to startAnimation ().
source share