Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Two animations one after another

I want to make 2 animation on activity for 2 images, and I want to do it with 2 conditions:
1. I want to start the animation after the activity finished to load to page, so instead of putting animation code under onCreate i put it under onResume is that OK? There is a better way to do it?

2. I want the second animation will start only after the first animation is finished...

Thanks

like image 680
choop Avatar asked Dec 06 '25 15:12

choop


1 Answers

You'll want to use an Animation.AnimationListner You can set one on your first animation that will get a callback when the animation is complete. Inside that callback you can add the code that will start the second animation.

like image 189
FoamyGuy Avatar answered Dec 08 '25 20:12

FoamyGuy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!