I am using animators (ObjectAnimator) to animate few properties (scale, rotate) of a view.
Target view is animating properly when ObjectAnimators are set to it.
But there is an added requirement to get view to the original position (reset) after a while.
I tried to cancel() the animator but it only cancels the animation and doesn't reset the view.
Possible solution : creating another animator that does just opposite of the initial animator.
Is there any other way to reset it ?
Do you mean stop a running animation? If so, call
clearAnimation()
to remove animations from the views that you calledstartAnimation();
If what you mean is to reset the view to its original appearance after the animation is over, alwayssetFillAfter(false);
to the animations.