简体   繁体   中英

Alternative to Translate Animation

I finally came to know that when using translate animation, the button onclick listener won't work.

This is the link to the full description of my problem

Now I would like to know what is the alternative options to try instead of Translate Animation.

You can use your own animation using a thread.

I can give you an example.

  1. Put your view to animate inside a Relative Layout.
  2. Then start a thread which is running a loop with specific delay time and then set the margin of the view that you need to animate with different values..

This will give you the effect of translate animation and the view will be intractable also.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM