I have a simple RotateAnimation
to animate an ImageView
indefinitely until I stop it. I have the animation set up as follows:
Animation spin = new RotateAnimation(0.0f, 1800.0f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
spin.setInterpolator(new LinearInterpolator());
spin.setRepeatCount(Animation.INFINITE);
spin.setDuration(5000);
imageView.setAnimation(spin);
When I call imageView.cancelAnimation()
, is it possible for me to "freeze" the animation right at whatever frame it ended on (or whatever angle it's at) instead of having it reset to the first frame?