简体   繁体   中英

Translate animation in android

I am new in android. I want to use the translate animation in android. I want that the red rounded image comes from center of the layout. It comes . But i want that the red rounded image comes back from the center image which color is green.

I am not able to attach image because my reputation below 15.

You will have to take 2 images - red and green. You will have to use AnimationListners for that and maintain boolean variable to check whether you want to animate red color or green color.

you need to structure you layout with this images. 2image must be under 1 image on your layout.

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