AndroidViewAnimations icon indicating copy to clipboard operation
AndroidViewAnimations copied to clipboard

Can not reset view to original

Open hlongvu opened this issue 10 years ago • 5 comments

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?

hlongvu avatar Feb 04 '15 14:02 hlongvu

Hv to upvote this.

kevintanhongann avatar Mar 03 '15 09:03 kevintanhongann

any?

rulogarcillan avatar Mar 31 '15 12:03 rulogarcillan

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.

SkynetHome avatar Sep 22 '15 22:09 SkynetHome

I have same issue. Any suggest?

majidnow avatar Nov 27 '18 15:11 majidnow

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);

pejman-74 avatar Feb 08 '19 14:02 pejman-74