public class DefaultItemAnimator
extends SimpleItemAnimator

   ↳ androidx.recyclerview.widget.RecyclerView.ItemAnimator
     ↳ androidx.recyclerview.widget.SimpleItemAnimator
       ↳ androidx.recyclerview.widget.DefaultItemAnimator

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

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 fromLeft, int fromTop, int toLeft, int toTop)

Called when an item is changed in the RecyclerView, as indicated by a call to RecyclerView.Adapter.notifyItemChanged(int) or RecyclerView.Adapter.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.