explaingit

wasabeef/recyclerview-animators

11,553KotlinAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

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.

Mindmap

mindmap
  root((repo))
    What It Does
      List item animations
      Add remove effects
      Scroll-in animations
    Animation Types
      Slide effects
      Fade effects
      Scale and flip effects
    Tech Stack
      Kotlin
      Java
      Android
    Setup
      One Gradle line
      Assign to adapter
    Audience
      Android developers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Add slide-in or fade-in animations when items appear or disappear in an Android list with almost no code

USE CASE 2

Animate each row as it scrolls into view for the first time to give an app a polished first impression

USE CASE 3

Combine multiple animation styles in the same list so different types of rows animate differently

Tech stack

KotlinJavaAndroidMaven Central

Getting it running

Difficulty · easy Time to first run · 5min

Animations only fire when using item-level methods like notifyItemInserted, calling notifyDataSetChanged skips them.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

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.

Copy-paste prompts

Prompt 1
I'm building an Android app with a RecyclerView and I want items to slide in from the left when added and fade out when removed, using recyclerview-animators. Show me the Gradle dependency and the two lines of code to set it up on my adapter.
Prompt 2
Using recyclerview-animators, how do I make each item in my list animate in sequentially from the top as the screen first loads, using the AlphaInAnimator?
Prompt 3
Help me mix two animation styles in the same RecyclerView using recyclerview-animators, I want new items to slide in from the right, but existing items to scale up when they change.
Prompt 4
I added recyclerview-animators but the animations are not triggering when I add items. What is the most common mistake and how do I fix it?
Open on GitHub → Explain another repo

← wasabeef on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.