added in version 22.1.0
belongs to Maven artifact


public class DefaultItemAnimator
extends SimpleItemAnimator


This implementation of RecyclerView.ItemAnimator provides basic animations on remove, add, and move events that happen to the items in a RecyclerView. RecyclerView uses a DefaultItemAnimator by default.


Inherited constants

From class

Public constructors


Public methods

boolean animateAdd(RecyclerView.ViewHolder holder)

Called when an item is added to the RecyclerView.

boolean animateChange(RecyclerView.ViewHolder oldHolder, RecyclerView.ViewHolder newHolder, int fromX, int fromY, int toX, int toY)

Called when an item is changed in the RecyclerView, as indicated by a call to notifyItemChanged(int) or notifyItemRangeChanged(int, int).

boolean animateMove(RecyclerView.ViewHolder holder, int fromX, int fromY, int toX, int toY)

Called when an item is moved in the RecyclerView.

boolean animateRemove(RecyclerView.ViewHolder holder)

Called when an item is removed from the RecyclerView.

boolean canReuseUpdatedViewHolder(RecyclerView.ViewHolder viewHolder, List<Object> payloads)

When an item is changed, ItemAnimator can decide whether it wants to re-use the same ViewHolder for animations or RecyclerView should create a copy of the item and ItemAnimator will use both to run the animation (e.g.

If the payload list is not empty, DefaultItemAnimator returns true.

void endAnimation(RecyclerView.ViewHolder item)