SimpleItemAnimator
abstract class SimpleItemAnimator : RecyclerView.ItemAnimator
A wrapper class for ItemAnimator that records View bounds and decides whether it should run move, change, add or remove animations. This class also replicates the original ItemAnimator API.
It uses RecyclerView.ItemAnimator.ItemHolderInfo
to track the bounds information of the Views. If you would like to extend this class, you can override obtainHolderInfo()
method to provide your own info class that extends RecyclerView.ItemAnimator.ItemHolderInfo
.
Summary
Inherited constants |
From class ItemAnimator
Int |
FLAG_APPEARED_IN_PRE_LAYOUT
This ViewHolder was not laid out but has been added to the layout in pre-layout state by the LayoutManager . This means that the item was already in the Adapter but invisible and it may become visible in the post layout phase. LayoutManagers may prefer to add new items in pre-layout to specify their virtual location when they are invisible (e.g. to specify the item should animate in from below the visible area).
|
Int |
FLAG_CHANGED
The Item represented by this ViewHolder is updated.
|
Int |
FLAG_INVALIDATED
Adapter Adapter#notifyDataSetChanged() has been called and the content represented by this ViewHolder is invalid.
|
Int |
FLAG_MOVED
The position of the Item represented by this ViewHolder has been changed. This flag is not bound to Adapter#notifyItemMoved(int, int) . It might be set in response to any adapter change that may have a side effect on this item. (e.g. The item before this one has been removed from the Adapter).
|
Int |
FLAG_REMOVED
The Item represented by this ViewHolder is removed from the adapter.
|
|
Public constructors |
A wrapper class for ItemAnimator that records View bounds and decides whether it should run move, change, add or remove animations.
|