CQM
CQM

Reputation: 44268

Android how to animate objects sequentially

I want to animate some multiple objects sequentially. As in, one animation should happen right after the previous animation stops.

I was using TranslateAnimations but it appears that all animations happen at the same time. I then tried putting all TranslateAnimations into an AnimationSet but this doesn't do what I imagined it would do.

What is the proper way to have multiple translateAnimations happen one after the other. Since this will loop, I can't just mess around with the setDuration because they will eventually get out of sync

Upvotes: 1

Views: 1339

Answers (1)

Femi
Femi

Reputation: 64700

You can use an AnimationListener to start the next animation after the previous one ends. This would make sure that only one runs at a time, and they go in the right order.

Upvotes: 3

Related Questions