recyclerview-animators
An Android Animation library which easily add itemanimator to RecyclerView items.
An Android library that adds smooth animations when items are added, removed, or scroll into view in a list. Drop it in with one line and your RecyclerView gets slide, fade, scale, and flip effects automatically.
RecyclerView Animators is an Android library that makes it easy to add animations when items appear, disappear, or change in a scrollable list. On Android, lists are built with a component called RecyclerView, and this library plugs into it to produce smooth visual effects without writing the animation code yourself.
There are two types of animation it provides. The first type triggers when individual list items are added or removed, producing effects like sliding in from the left, fading in, scaling up, or flipping into view. The second type runs when the list first loads, animating each item as it scrolls into view for the first time.
Using it takes two steps. You add the library to your project's build file with one line, then you assign an animator to your list before it appears on screen. From that point on, whenever you add or remove items using the correct notification methods, the animations play automatically. The README notes one important constraint: you must call the specific item-level update methods rather than the general refresh method, otherwise the animations will not trigger.
For developers who want more control, the library allows changing the animation speed, swapping in different timing curves, and mixing multiple animation styles together by wrapping one adapter inside another. There is also an interface for overriding the preset animations on a per-item basis, so different rows in the same list can animate differently.
The library is distributed through Maven Central and works with both Kotlin and Java Android projects. It is released under the Apache 2.0 license, so it can be used freely in commercial apps.
Where it fits
- Add slide-in or fade-in animations when items appear or disappear in an Android list with almost no code
- Animate each row as it scrolls into view for the first time to give an app a polished first impression
- Combine multiple animation styles in the same list so different types of rows animate differently