AndroidViewAnimations
AndroidViewAnimations copied to clipboard
Can not reset view to original
When I play some rotating animation on a view: YoYo.with(Techniques.RollOut).delay(500).playOn(pig); then need to clear animations to reset the view: pig.clearAnimation(); The view then stops animating but it's not back to original shape, may be still some transformation applied in!
How can I reset the view?
Hv to upvote this.
any?
This may not be the most elegant solution but it works for me. In your updateDisplay method reverse the animation.
For example in my OnClickListener I have YoYo.with(Techniques.FlipOutX.duration(150).playOn(mLettterOneView);
then in updateDisplay() mLetterOneView.setText(myStringOne); YoYo.with(Techniques.FlipInX).duration(150).playOn(mLetterOneView);
Obviously you could lower duration to make letter just reappear.
I have same issue. Any suggest?
YOYO not support 'fillafter' property. for the you'r view showed again do something like this after animation end action :YoYo.with(Techniques.ZoomIn).duration(1).playOn(animated_view);