On my approach I’m going to combine 2 popular libraries, one to simplify the code for the list adapter Renderers: https://github.com/pedrovgs/Renderers and for the key problem RxJava: https://github.com/ReactiveX/RxJava in order to manage the timer and the subscriptions in a simple way.

So, the first part is to create the timer and broadcast every X seconds (milliseconds, minutes, centuries, …) the signal to update list’s rows:

Don’t forget to unsubscribe to our brand new timer when we’re exiting:

Then we need to pass this animationTimer to every row, for our approach is easy because we can take advantage of the RedendererBuilder of Renderers library:

But hey! show me the magic inside this CustomRendererBuilder thing!:

There is no magic inside CustomRendererBuilder, only the simpler implementation we can do in order to pass our animationTimer to every row.

At this point we’ve created the timer, the adapter and sent the timer through the adapter to the list’s rows, only one thing is remaining: in our row implementation called Renderer (to fit the convention with Renderers library), we need to subscribe to the timer and call the animation on every emission from it:

That’s it! In our example the animation takes only one second to complete, this is important because the timer is emitting new events every second, and is the key to maintain the synchronization and a perfect animation effect in our list (if you want larger or fewer animations, you must keep both times the same).

You can find a full working example here: https://github.com/FireZenk/RecyclerViewSyncedAnimations

If you liked the article don’t forget to share, comment and if you wish, follow me on Twitter: https://twitter.com/FireZenk

Thanks to https://twitter.com/celtric for the revision and ViscaWeb for their support.