# SimpleItemAnimator

# SimpleItemAnimator

Artifact:[androidx.recyclerview:recyclerview](https://developer.android.com/jetpack/androidx/releases/recyclerview)  
[View Source](https://cs.android.com/search?q=file:androidx/recyclerview/widget/SimpleItemAnimator.java+class:androidx.recyclerview.widget.SimpleItemAnimator)  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.0.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/recyclerview/widget/SimpleItemAnimator "View this page in Java")

<br />

```
abstract class SimpleItemAnimator : RecyclerView.ItemAnimator
```

<br />

|---|---|---------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)                                                                      |||
| ↳ | [androidx.recyclerview.widget.RecyclerView.ItemAnimator](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator) ||
|   | ↳ | [androidx.recyclerview.widget.SimpleItemAnimator](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator) |

Known direct subclasses  
[DefaultItemAnimator](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/DefaultItemAnimator)  

|------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [DefaultItemAnimator](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/DefaultItemAnimator) | This implementation of[RecyclerView.ItemAnimator](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator)provides basic animations on remove, add, and move events that happen to the items in a RecyclerView. |

*** ** * ** ***

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](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator.ItemHolderInfo)to track the bounds information of the Views. If you would like to extend this class, you can override[obtainHolderInfo](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#obtainHolderInfo())method to provide your own info class that extends[RecyclerView.ItemAnimator.ItemHolderInfo](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator.ItemHolderInfo).

## Summary

|                                                            ### Public constructors                                                            |
|-----------------------------------------------------------------------------------------------------------------------------------------------|
| [SimpleItemAnimator](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#SimpleItemAnimator())`()` |

|                                      ### Public functions                                      |
|------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `abstract `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [animateAdd](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#animateAdd(androidx.recyclerview.widget.RecyclerView.ViewHolder))`(holder: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!)` Called when an item is added to the RecyclerView.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)            | [animateAppearance](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#animateAppearance(androidx.recyclerview.widget.RecyclerView.ViewHolder,androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo,androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo))`(` ` viewHolder: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`,` ` preLayoutInfo: `[RecyclerView.ItemAnimator.ItemHolderInfo](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator.ItemHolderInfo)`?,` ` postLayoutInfo: `[RecyclerView.ItemAnimator.ItemHolderInfo](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator.ItemHolderInfo) `)` Called by the RecyclerView when a ViewHolder is added to the layout.                                                                                                                                                                                                                                                                                                                                                                                                           |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)            | [animateChange](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#animateChange(androidx.recyclerview.widget.RecyclerView.ViewHolder,androidx.recyclerview.widget.RecyclerView.ViewHolder,androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo,androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo))`(` ` oldHolder: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`,` ` newHolder: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`,` ` preLayoutInfo: `[RecyclerView.ItemAnimator.ItemHolderInfo](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator.ItemHolderInfo)`,` ` postLayoutInfo: `[RecyclerView.ItemAnimator.ItemHolderInfo](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator.ItemHolderInfo) `)` Called by the RecyclerView when an adapter item is present both before and after the layout and RecyclerView has received a[notifyItemChanged](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.Adapter#notifyItemChanged(int))call for it. |
| `abstract `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [animateChange](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#animateChange(androidx.recyclerview.widget.RecyclerView.ViewHolder,androidx.recyclerview.widget.RecyclerView.ViewHolder,int,int,int,int))`(` ` oldHolder: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!,` ` newHolder: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!,` ` fromLeft: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`,` ` fromTop: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`,` ` toLeft: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`,` ` toTop: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) `)` Called when an item is changed in the RecyclerView, as indicated by a call to[notifyItemChanged](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.Adapter#notifyItemChanged(int))or[notifyItemRangeChanged](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.Adapter#notifyItemRangeChanged(int,int)).                           |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)            | [animateDisappearance](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#animateDisappearance(androidx.recyclerview.widget.RecyclerView.ViewHolder,androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo,androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo))`(` ` viewHolder: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`,` ` preLayoutInfo: `[RecyclerView.ItemAnimator.ItemHolderInfo](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator.ItemHolderInfo)`,` ` postLayoutInfo: `[RecyclerView.ItemAnimator.ItemHolderInfo](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator.ItemHolderInfo)`?` `)` Called by the RecyclerView when a ViewHolder has disappeared from the layout.                                                                                                                                                                                                                                                                                                                                                                                          |
| `abstract `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [animateMove](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#animateMove(androidx.recyclerview.widget.RecyclerView.ViewHolder,int,int,int,int))`(` ` holder: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!,` ` fromX: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`,` ` fromY: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`,` ` toX: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`,` ` toY: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) `)` Called when an item is moved in the RecyclerView.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)            | [animatePersistence](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#animatePersistence(androidx.recyclerview.widget.RecyclerView.ViewHolder,androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo,androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo))`(` ` viewHolder: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`,` ` preLayoutInfo: `[RecyclerView.ItemAnimator.ItemHolderInfo](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator.ItemHolderInfo)`,` ` postLayoutInfo: `[RecyclerView.ItemAnimator.ItemHolderInfo](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator.ItemHolderInfo) `)` Called by the RecyclerView when a ViewHolder is present in both before and after the layout and RecyclerView has not received a[notifyItemChanged](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.Adapter#notifyItemChanged(int))call for it or a[notifyDataSetChanged](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.Adapter#notifyDataSetChanged())call.                               |
| `abstract `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [animateRemove](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#animateRemove(androidx.recyclerview.widget.RecyclerView.ViewHolder))`(holder: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!)` Called when an item is removed from the RecyclerView.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)            | [canReuseUpdatedViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#canReuseUpdatedViewHolder(androidx.recyclerview.widget.RecyclerView.ViewHolder))`(viewHolder: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`)` 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. cross-fade).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                  | [dispatchAddFinished](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#dispatchAddFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder))`(item: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!)` Method to be called by subclasses when an add animation is done.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                  | [dispatchAddStarting](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#dispatchAddStarting(androidx.recyclerview.widget.RecyclerView.ViewHolder))`(item: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!)` Method to be called by subclasses when an add animation is being started.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                  | [dispatchChangeFinished](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#dispatchChangeFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder,boolean))`(item: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!, oldItem: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`)` Method to be called by subclasses when a change animation is done.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                  | [dispatchChangeStarting](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#dispatchChangeStarting(androidx.recyclerview.widget.RecyclerView.ViewHolder,boolean))`(item: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!, oldItem: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`)` Method to be called by subclasses when a change animation is being started.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                  | [dispatchMoveFinished](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#dispatchMoveFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder))`(item: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!)` Method to be called by subclasses when a move animation is done.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                  | [dispatchMoveStarting](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#dispatchMoveStarting(androidx.recyclerview.widget.RecyclerView.ViewHolder))`(item: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!)` Method to be called by subclasses when a move animation is being started.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                  | [dispatchRemoveFinished](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#dispatchRemoveFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder))`(item: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!)` Method to be called by subclasses when a remove animation is done.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                  | [dispatchRemoveStarting](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#dispatchRemoveStarting(androidx.recyclerview.widget.RecyclerView.ViewHolder))`(item: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!)` Method to be called by subclasses when a remove animation is being started.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)            | [getSupportsChangeAnimations](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#getSupportsChangeAnimations())`()` Returns whether this ItemAnimator supports animations of change events.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                  | [onAddFinished](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#onAddFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder))`(item: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!)` Called when an add animation has ended on the given ViewHolder.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                  | [onAddStarting](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#onAddStarting(androidx.recyclerview.widget.RecyclerView.ViewHolder))`(item: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!)` Called when an add animation is being started on the given ViewHolder.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                  | [onChangeFinished](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#onChangeFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder,boolean))`(item: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!, oldItem: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`)` Called when a change animation has ended on the given ViewHolder.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                  | [onChangeStarting](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#onChangeStarting(androidx.recyclerview.widget.RecyclerView.ViewHolder,boolean))`(item: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!, oldItem: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`)` Called when a change animation is being started on the given ViewHolder.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                  | [onMoveFinished](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#onMoveFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder))`(item: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!)` Called when a move animation has ended on the given ViewHolder.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                  | [onMoveStarting](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#onMoveStarting(androidx.recyclerview.widget.RecyclerView.ViewHolder))`(item: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!)` Called when a move animation is being started on the given ViewHolder.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                  | [onRemoveFinished](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#onRemoveFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder))`(item: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!)` Called when a remove animation has ended on the given ViewHolder.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                  | [onRemoveStarting](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#onRemoveStarting(androidx.recyclerview.widget.RecyclerView.ViewHolder))`(item: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!)` Called when a remove animation is being started on the given ViewHolder.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                  | [setSupportsChangeAnimations](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#setSupportsChangeAnimations(boolean))`(supportsChangeAnimations: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`)` Sets whether this ItemAnimator supports animations of item change events.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ### Inherited Constants                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From[androidx.recyclerview.widget.RecyclerView.ItemAnimator](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator) |-------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [FLAG_APPEARED_IN_PRE_LAYOUT](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#FLAG_APPEARED_IN_PRE_LAYOUT())` = 4096` This ViewHolder was not laid out but has been added to the layout in pre-layout state by the[LayoutManager](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.LayoutManager). | | `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [FLAG_CHANGED](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#FLAG_CHANGED())` = 2` The Item represented by this ViewHolder is updated.                                                                                                                                                                                                   | | `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [FLAG_INVALIDATED](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#FLAG_INVALIDATED())` = 4` Adapter[notifyDataSetChanged](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.Adapter#notifyDataSetChanged())has been called and the content represented by this ViewHolder is invalid.              | | `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [FLAG_MOVED](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#FLAG_MOVED())` = 2048` The position of the Item represented by this ViewHolder has been changed.                                                                                                                                                                              | | `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [FLAG_REMOVED](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#FLAG_REMOVED())` = 8` The Item represented by this ViewHolder is removed from the adapter.                                                                                                                                                                                  | |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     ### Inherited functions                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From[androidx.recyclerview.widget.RecyclerView.ItemAnimator](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator) |------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                                                              | [canReuseUpdatedViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#canReuseUpdatedViewHolder(androidx.recyclerview.widget.RecyclerView.ViewHolder,java.util.List<java.lang.Object>))`(` ` viewHolder: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`,` ` payloads: (`[Mutable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)`)`[List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)`<`[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`!>` `)` 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. cross-fade).                                                                                                                                                                                                                                                                          | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                                    | [dispatchAnimationFinished](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#dispatchAnimationFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder))`(viewHolder: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`)` Method to be called by subclasses when an animation is finished.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                                    | [dispatchAnimationStarted](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#dispatchAnimationStarted(androidx.recyclerview.widget.RecyclerView.ViewHolder))`(viewHolder: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`)` Method to be called by subclasses when an animation is started.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                                    | [dispatchAnimationsFinished](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#dispatchAnimationsFinished())`()` This method should be called by ItemAnimator implementations to notify any listeners that all pending and active item animations are finished.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | `abstract `[Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                         | [endAnimation](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#endAnimation(androidx.recyclerview.widget.RecyclerView.ViewHolder))`(item: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`)` Method called when an animation on a view should be ended immediately.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | `abstract `[Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                         | [endAnimations](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#endAnimations())`()` Method called when all item animations should be ended immediately.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)                                                                                    | [getAddDuration](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#getAddDuration())`()` Gets the current duration for which all add animations will run.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)                                                                                    | [getChangeDuration](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#getChangeDuration())`()` Gets the current duration for which all change animations will run.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)                                                                                    | [getMoveDuration](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#getMoveDuration())`()` Gets the current duration for which all move animations will run.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)                                                                                    | [getRemoveDuration](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#getRemoveDuration())`()` Gets the current duration for which all remove animations will run.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | `abstract `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                                                   | [isRunning](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#isRunning())`()` Method which returns whether there are any item animations currently running.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                                                              | [isRunning](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#isRunning(androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemAnimatorFinishedListener))`(` ` listener: `[RecyclerView.ItemAnimator.ItemAnimatorFinishedListener](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator.ItemAnimatorFinishedListener)`?` `)` Like[isRunning](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#isRunning()), this method returns whether there are any item animations currently running.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | [RecyclerView.ItemAnimator.ItemHolderInfo](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator.ItemHolderInfo) | [obtainHolderInfo](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#obtainHolderInfo())`()` Returns a new[ItemHolderInfo](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator.ItemHolderInfo)which will be used to store information about the ViewHolder.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                                    | [onAnimationFinished](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#onAnimationFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder))`(viewHolder: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`)` Called after[dispatchAnimationFinished](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#dispatchAnimationFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder))is called by the ItemAnimator.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                                    | [onAnimationStarted](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#onAnimationStarted(androidx.recyclerview.widget.RecyclerView.ViewHolder))`(viewHolder: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`)` Called when a new animation is started on the given ViewHolder.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | [RecyclerView.ItemAnimator.ItemHolderInfo](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator.ItemHolderInfo) | [recordPostLayoutInformation](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#recordPostLayoutInformation(androidx.recyclerview.widget.RecyclerView.State,androidx.recyclerview.widget.RecyclerView.ViewHolder))`(` ` state: `[RecyclerView.State](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.State)`,` ` viewHolder: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder) `)` Called by the RecyclerView after the layout is complete.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | [RecyclerView.ItemAnimator.ItemHolderInfo](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator.ItemHolderInfo) | [recordPreLayoutInformation](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#recordPreLayoutInformation(androidx.recyclerview.widget.RecyclerView.State,androidx.recyclerview.widget.RecyclerView.ViewHolder,int,java.util.List<java.lang.Object>))`(` ` state: `[RecyclerView.State](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.State)`,` ` viewHolder: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`,` ` @`[RecyclerView.ItemAnimator.AdapterChanges](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator.AdapterChanges)` changeFlags: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`,` ` payloads: (`[Mutable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)`)`[List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)`<`[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`!>` `)` Called by the RecyclerView before the layout begins. | | `abstract `[Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                         | [runPendingAnimations](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#runPendingAnimations())`()` Called when there are pending animations waiting to be started.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                                    | [setAddDuration](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#setAddDuration(long))`(addDuration: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`)` Sets the duration for which all add animations will run.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                                    | [setChangeDuration](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#setChangeDuration(long))`(changeDuration: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`)` Sets the duration for which all change animations will run.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                                    | [setMoveDuration](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#setMoveDuration(long))`(moveDuration: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`)` Sets the duration for which all move animations will run.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                                    | [setRemoveDuration](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#setRemoveDuration(long))`(removeDuration: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`)` Sets the duration for which all remove animations will run.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | |

## Public constructors

### SimpleItemAnimator

Added in 1.0.0  

```
SimpleItemAnimator()
```  

## Public functions

### animateAdd

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.0.0)  

```
abstract fun animateAdd(holder: RecyclerView.ViewHolder!): Boolean
```

Called when an item is added to the RecyclerView. Implementors can choose whether and how to animate that change, but must always call[dispatchAddFinished](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#dispatchAddFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder))when done, either immediately (if no animation will occur) or after the animation actually finishes. The return value indicates whether an animation has been set up and whether the ItemAnimator's[runPendingAnimations](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#runPendingAnimations())method should be called at the next opportunity. This mechanism allows ItemAnimator to set up individual animations as separate calls to[animateAdd()](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#animateAdd(androidx.recyclerview.widget.RecyclerView.ViewHolder)),[animateMove()](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#animateMove(androidx.recyclerview.widget.RecyclerView.ViewHolder,int,int,int,int)),[animateRemove()](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#animateRemove(androidx.recyclerview.widget.RecyclerView.ViewHolder)), and[animateChange](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#animateChange(androidx.recyclerview.widget.RecyclerView.ViewHolder,androidx.recyclerview.widget.RecyclerView.ViewHolder,int,int,int,int))come in one by one, then start the animations together in the later call to[runPendingAnimations](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#runPendingAnimations()).

This method may also be called for appearing items which were already in the RecyclerView, but for which the system does not have enough information to animate them into view. In that case, the default animation for adding items is run on those items as well.  

|                                                                 Parameters                                                                  |
|---------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------|
| `holder: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!` | The item that is being added. |

|                                       Returns                                       |
|-------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | true if a later call to[runPendingAnimations](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#runPendingAnimations())is requested, false otherwise. |

### animateAppearance

Added in[1.4.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.4.0)  

```
fun animateAppearance(
    viewHolder: RecyclerView.ViewHolder,
    preLayoutInfo: RecyclerView.ItemAnimator.ItemHolderInfo?,
    postLayoutInfo: RecyclerView.ItemAnimator.ItemHolderInfo
): Boolean
```

Called by the RecyclerView when a ViewHolder is added to the layout.

In detail, this means that the ViewHolder was**not**a child when the layout started but has been added by the LayoutManager. It might be newly added to the adapter or simply become visible due to other factors.

ItemAnimator must call[dispatchAnimationFinished](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#dispatchAnimationFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder))when the animation is complete (or instantly call[dispatchAnimationFinished](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#dispatchAnimationFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder))if it decides not to animate the view).  

|                                                                                      Parameters                                                                                      |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `viewHolder: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)                                         | The ViewHolder which should be animated                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `preLayoutInfo: `[RecyclerView.ItemAnimator.ItemHolderInfo](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator.ItemHolderInfo)`?` | The information that was returned from[recordPreLayoutInformation](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#recordPreLayoutInformation(androidx.recyclerview.widget.RecyclerView.State,androidx.recyclerview.widget.RecyclerView.ViewHolder,int,java.util.List<java.lang.Object>)). Might be null if Item was just added to the adapter or LayoutManager does not support predictive animations or it could not predict that this ViewHolder will become visible. |
| `postLayoutInfo: `[RecyclerView.ItemAnimator.ItemHolderInfo](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator.ItemHolderInfo)   | The information that was returned from[recordPreLayoutInformation](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#recordPreLayoutInformation(androidx.recyclerview.widget.RecyclerView.State,androidx.recyclerview.widget.RecyclerView.ViewHolder,int,java.util.List<java.lang.Object>)).                                                                                                                                                                               |

|                                       Returns                                       |
|-------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | true if a later call to[runPendingAnimations](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#runPendingAnimations())is requested, false otherwise. |

### animateChange

Added in[1.4.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.4.0)  

```
fun animateChange(
    oldHolder: RecyclerView.ViewHolder,
    newHolder: RecyclerView.ViewHolder,
    preLayoutInfo: RecyclerView.ItemAnimator.ItemHolderInfo,
    postLayoutInfo: RecyclerView.ItemAnimator.ItemHolderInfo
): Boolean
```

Called by the RecyclerView when an adapter item is present both before and after the layout and RecyclerView has received a[notifyItemChanged](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.Adapter#notifyItemChanged(int))call for it. This method may also be called when[notifyDataSetChanged](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.Adapter#notifyDataSetChanged())is called and adapter has stable ids so that RecyclerView could still rebind views to the same ViewHolders. If viewType changes when[notifyDataSetChanged](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.Adapter#notifyDataSetChanged())is called, this method**will not** be called, instead,[animateAppearance](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#animateAppearance(androidx.recyclerview.widget.RecyclerView.ViewHolder,androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo,androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo))will be called for the new ViewHolder and the old one will be recycled.

If this method is called due to a[notifyDataSetChanged](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.Adapter#notifyDataSetChanged())call, there is a good possibility that item contents didn't really change but it is rebound from the adapter.[DefaultItemAnimator](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/DefaultItemAnimator)will skip animating the View if its location on the screen didn't change and your animator should handle this case as well and avoid creating unnecessary animations.

When an item is updated, ItemAnimator has a chance to ask RecyclerView to keep the previous presentation of the item as-is and supply a new ViewHolder for the updated presentation (see:[canReuseUpdatedViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#canReuseUpdatedViewHolder(androidx.recyclerview.widget.RecyclerView.ViewHolder,java.util.List<java.lang.Object>)). This is useful if you don't know the contents of the Item and would like to cross-fade the old and the new one ([DefaultItemAnimator](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/DefaultItemAnimator)uses this technique).

When you are writing a custom item animator for your layout, it might be more performant and elegant to re-use the same ViewHolder and animate the content changes manually.

When[notifyItemChanged](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.Adapter#notifyItemChanged(int))is called, the Item's view type may change. If the Item's view type has changed or ItemAnimator returned`false`for this ViewHolder when[canReuseUpdatedViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#canReuseUpdatedViewHolder(androidx.recyclerview.widget.RecyclerView.ViewHolder,java.util.List<java.lang.Object>))was called, the`oldHolder`and`newHolder`will be different ViewHolder instances which represent the same Item. In that case, only the new ViewHolder is visible to the LayoutManager but RecyclerView keeps old ViewHolder attached for animations.

ItemAnimator must call[dispatchAnimationFinished](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#dispatchAnimationFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder))for each distinct ViewHolder when their animation is complete (or instantly call[dispatchAnimationFinished](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#dispatchAnimationFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder))if it decides not to animate the view).

If oldHolder and newHolder are the same instance, you should call[dispatchAnimationFinished](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#dispatchAnimationFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder))**only once**.

Note that when a ViewHolder both changes and disappears in the same layout pass, the animation callback method which will be called by the RecyclerView depends on the ItemAnimator's decision whether to re-use the same ViewHolder or not, and also the LayoutManager's decision whether to layout the changed version of a disappearing ViewHolder or not. RecyclerView will call`animateChange`instead of[animateDisappearance](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#animateDisappearance(androidx.recyclerview.widget.RecyclerView.ViewHolder,androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo,androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo))if and only if the ItemAnimator returns`false`from[canReuseUpdatedViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#canReuseUpdatedViewHolder(androidx.recyclerview.widget.RecyclerView.ViewHolder))and the LayoutManager lays out a new disappearing view that holds the updated information. Built-in LayoutManagers try to avoid laying out updated versions of disappearing views.  

|                                                                                     Parameters                                                                                     |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `oldHolder: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)                                        | The ViewHolder before the layout is started, might be the same instance with newHolder.                                                                                                                                                                                                                                                          |
| `newHolder: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)                                        | The ViewHolder after the layout is finished, might be the same instance with oldHolder.                                                                                                                                                                                                                                                          |
| `preLayoutInfo: `[RecyclerView.ItemAnimator.ItemHolderInfo](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator.ItemHolderInfo)  | The information that was returned from[recordPreLayoutInformation](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#recordPreLayoutInformation(androidx.recyclerview.widget.RecyclerView.State,androidx.recyclerview.widget.RecyclerView.ViewHolder,int,java.util.List<java.lang.Object>)). |
| `postLayoutInfo: `[RecyclerView.ItemAnimator.ItemHolderInfo](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator.ItemHolderInfo) | The information that was returned from[recordPreLayoutInformation](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#recordPreLayoutInformation(androidx.recyclerview.widget.RecyclerView.State,androidx.recyclerview.widget.RecyclerView.ViewHolder,int,java.util.List<java.lang.Object>)). |

|                                       Returns                                       |
|-------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | true if a later call to[runPendingAnimations](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#runPendingAnimations())is requested, false otherwise. |

### animateChange

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.0.0)  

```
abstract fun animateChange(
    oldHolder: RecyclerView.ViewHolder!,
    newHolder: RecyclerView.ViewHolder!,
    fromLeft: Int,
    fromTop: Int,
    toLeft: Int,
    toTop: Int
): Boolean
```

Called when an item is changed in the RecyclerView, as indicated by a call to[notifyItemChanged](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.Adapter#notifyItemChanged(int))or[notifyItemRangeChanged](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.Adapter#notifyItemRangeChanged(int,int)).

Implementers can choose whether and how to animate changes, but must always call[dispatchChangeFinished](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#dispatchChangeFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder,boolean))for each non-null distinct ViewHolder, either immediately (if no animation will occur) or after the animation actually finishes. If the`oldHolder`is the same ViewHolder as the`newHolder`, you must call[dispatchChangeFinished](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#dispatchChangeFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder,boolean))once and only once. In that case, the second parameter of`dispatchChangeFinished`is ignored.

The return value indicates whether an animation has been set up and whether the ItemAnimator's[runPendingAnimations](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#runPendingAnimations())method should be called at the next opportunity. This mechanism allows ItemAnimator to set up individual animations as separate calls to[animateAdd()](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#animateAdd(androidx.recyclerview.widget.RecyclerView.ViewHolder)),[animateMove()](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#animateMove(androidx.recyclerview.widget.RecyclerView.ViewHolder,int,int,int,int)),[animateRemove()](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#animateRemove(androidx.recyclerview.widget.RecyclerView.ViewHolder)), and[animateChange](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#animateChange(androidx.recyclerview.widget.RecyclerView.ViewHolder,androidx.recyclerview.widget.RecyclerView.ViewHolder,int,int,int,int))come in one by one, then start the animations together in the later call to[runPendingAnimations](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#runPendingAnimations()).  

|                                                                   Parameters                                                                   |
|------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------|
| `oldHolder: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!` | The original item that changed.                                       |
| `newHolder: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!` | The new item that was created with the changed content. Might be null |
| `fromLeft: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                        | Left of the old view holder                                           |
| `fromTop: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                         | Top of the old view holder                                            |
| `toLeft: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                          | Left of the new view holder                                           |
| `toTop: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                           | Top of the new view holder                                            |

|                                       Returns                                       |
|-------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | true if a later call to[runPendingAnimations](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#runPendingAnimations())is requested, false otherwise. |

### animateDisappearance

Added in[1.4.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.4.0)  

```
fun animateDisappearance(
    viewHolder: RecyclerView.ViewHolder,
    preLayoutInfo: RecyclerView.ItemAnimator.ItemHolderInfo,
    postLayoutInfo: RecyclerView.ItemAnimator.ItemHolderInfo?
): Boolean
```

Called by the RecyclerView when a ViewHolder has disappeared from the layout.

This means that the View was a child of the LayoutManager when layout started but has been removed by the LayoutManager. It might have been removed from the adapter or simply become invisible due to other factors. You can distinguish these two cases by checking the change flags that were passed to[recordPreLayoutInformation](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#recordPreLayoutInformation(androidx.recyclerview.widget.RecyclerView.State,androidx.recyclerview.widget.RecyclerView.ViewHolder,int,java.util.List<java.lang.Object>)).

Note that when a ViewHolder both changes and disappears in the same layout pass, the animation callback method which will be called by the RecyclerView depends on the ItemAnimator's decision whether to re-use the same ViewHolder or not, and also the LayoutManager's decision whether to layout the changed version of a disappearing ViewHolder or not. RecyclerView will call[animateChange](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#animateChange(androidx.recyclerview.widget.RecyclerView.ViewHolder,androidx.recyclerview.widget.RecyclerView.ViewHolder,androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo,androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo))instead of`animateDisappearance`if and only if the ItemAnimator returns`false`from[canReuseUpdatedViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#canReuseUpdatedViewHolder(androidx.recyclerview.widget.RecyclerView.ViewHolder))and the LayoutManager lays out a new disappearing view that holds the updated information. Built-in LayoutManagers try to avoid laying out updated versions of disappearing views.

If LayoutManager supports predictive animations, it might provide a target disappear location for the View by laying it out in that location. When that happens, RecyclerView will call[recordPostLayoutInformation](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#recordPostLayoutInformation(androidx.recyclerview.widget.RecyclerView.State,androidx.recyclerview.widget.RecyclerView.ViewHolder))and the response of that call will be passed to this method as the`postLayoutInfo`.

ItemAnimator must call[dispatchAnimationFinished](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#dispatchAnimationFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder))when the animation is complete (or instantly call[dispatchAnimationFinished](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#dispatchAnimationFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder))if it decides not to animate the view).  

|                                                                                      Parameters                                                                                       |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `viewHolder: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)                                          | The ViewHolder which should be animated                                                                                                                                                                                                                                                                                                                                   |
| `preLayoutInfo: `[RecyclerView.ItemAnimator.ItemHolderInfo](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator.ItemHolderInfo)     | The information that was returned from[recordPreLayoutInformation](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#recordPreLayoutInformation(androidx.recyclerview.widget.RecyclerView.State,androidx.recyclerview.widget.RecyclerView.ViewHolder,int,java.util.List<java.lang.Object>)).                          |
| `postLayoutInfo: `[RecyclerView.ItemAnimator.ItemHolderInfo](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator.ItemHolderInfo)`?` | The information that was returned from[recordPostLayoutInformation](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#recordPostLayoutInformation(androidx.recyclerview.widget.RecyclerView.State,androidx.recyclerview.widget.RecyclerView.ViewHolder)). Might be null if the LayoutManager did not layout the item. |

|                                       Returns                                       |
|-------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | true if a later call to[runPendingAnimations](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#runPendingAnimations())is requested, false otherwise. |

### animateMove

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.0.0)  

```
abstract fun animateMove(
    holder: RecyclerView.ViewHolder!,
    fromX: Int,
    fromY: Int,
    toX: Int,
    toY: Int
): Boolean
```

Called when an item is moved in the RecyclerView. Implementors can choose whether and how to animate that change, but must always call[dispatchMoveFinished](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#dispatchMoveFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder))when done, either immediately (if no animation will occur) or after the animation actually finishes. The return value indicates whether an animation has been set up and whether the ItemAnimator's[runPendingAnimations](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#runPendingAnimations())method should be called at the next opportunity. This mechanism allows ItemAnimator to set up individual animations as separate calls to[animateAdd()](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#animateAdd(androidx.recyclerview.widget.RecyclerView.ViewHolder)),[animateMove()](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#animateMove(androidx.recyclerview.widget.RecyclerView.ViewHolder,int,int,int,int)),[animateRemove()](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#animateRemove(androidx.recyclerview.widget.RecyclerView.ViewHolder)), and[animateChange](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#animateChange(androidx.recyclerview.widget.RecyclerView.ViewHolder,androidx.recyclerview.widget.RecyclerView.ViewHolder,int,int,int,int))come in one by one, then start the animations together in the later call to[runPendingAnimations](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#runPendingAnimations()).  

|                                                                 Parameters                                                                  |
|---------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------|
| `holder: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!` | The item that is being moved.               |
| `fromX: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                        | x coordinate from which to start animation. |
| `fromY: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                        | y coordinate from which to start animation. |
| `toX: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                          | x coordinate at which to end animation.     |
| `toY: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                          | y coordinate at which to end animation.     |

|                                       Returns                                       |
|-------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | true if a later call to[runPendingAnimations](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#runPendingAnimations())is requested, false otherwise. |

### animatePersistence

Added in[1.4.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.4.0)  

```
fun animatePersistence(
    viewHolder: RecyclerView.ViewHolder,
    preLayoutInfo: RecyclerView.ItemAnimator.ItemHolderInfo,
    postLayoutInfo: RecyclerView.ItemAnimator.ItemHolderInfo
): Boolean
```

Called by the RecyclerView when a ViewHolder is present in both before and after the layout and RecyclerView has not received a[notifyItemChanged](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.Adapter#notifyItemChanged(int))call for it or a[notifyDataSetChanged](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.Adapter#notifyDataSetChanged())call.

This ViewHolder still represents the same data that it was representing when the layout started but its position / size may be changed by the LayoutManager.

If the Item's layout position didn't change, RecyclerView still calls this method because it does not track this information (or does not necessarily know that an animation is not required). Your ItemAnimator should handle this case and if there is nothing to animate, it should call[dispatchAnimationFinished](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#dispatchAnimationFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder))and return`false`.

ItemAnimator must call[dispatchAnimationFinished](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#dispatchAnimationFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder))when the animation is complete (or instantly call[dispatchAnimationFinished](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#dispatchAnimationFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder))if it decides not to animate the view).  

|                                                                                     Parameters                                                                                     |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `viewHolder: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)                                       | The ViewHolder which should be animated                                                                                                                                                                                                                                                                                                          |
| `preLayoutInfo: `[RecyclerView.ItemAnimator.ItemHolderInfo](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator.ItemHolderInfo)  | The information that was returned from[recordPreLayoutInformation](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#recordPreLayoutInformation(androidx.recyclerview.widget.RecyclerView.State,androidx.recyclerview.widget.RecyclerView.ViewHolder,int,java.util.List<java.lang.Object>)). |
| `postLayoutInfo: `[RecyclerView.ItemAnimator.ItemHolderInfo](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator.ItemHolderInfo) | The information that was returned from[recordPreLayoutInformation](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#recordPreLayoutInformation(androidx.recyclerview.widget.RecyclerView.State,androidx.recyclerview.widget.RecyclerView.ViewHolder,int,java.util.List<java.lang.Object>)). |

|                                       Returns                                       |
|-------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | true if a later call to[runPendingAnimations](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#runPendingAnimations())is requested, false otherwise. |

### animateRemove

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.0.0)  

```
abstract fun animateRemove(holder: RecyclerView.ViewHolder!): Boolean
```

Called when an item is removed from the RecyclerView. Implementors can choose whether and how to animate that change, but must always call[dispatchRemoveFinished](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#dispatchRemoveFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder))when done, either immediately (if no animation will occur) or after the animation actually finishes. The return value indicates whether an animation has been set up and whether the ItemAnimator's[runPendingAnimations](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#runPendingAnimations())method should be called at the next opportunity. This mechanism allows ItemAnimator to set up individual animations as separate calls to[animateAdd()](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#animateAdd(androidx.recyclerview.widget.RecyclerView.ViewHolder)),[animateMove()](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#animateMove(androidx.recyclerview.widget.RecyclerView.ViewHolder,int,int,int,int)),[animateRemove()](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#animateRemove(androidx.recyclerview.widget.RecyclerView.ViewHolder)), and[animateChange](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#animateChange(androidx.recyclerview.widget.RecyclerView.ViewHolder,androidx.recyclerview.widget.RecyclerView.ViewHolder,int,int,int,int))come in one by one, then start the animations together in the later call to[runPendingAnimations](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#runPendingAnimations()).

This method may also be called for disappearing items which continue to exist in the RecyclerView, but for which the system does not have enough information to animate them out of view. In that case, the default animation for removing items is run on those items as well.  

|                                                                 Parameters                                                                  |
|---------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------|
| `holder: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!` | The item that is being removed. |

|                                       Returns                                       |
|-------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | true if a later call to[runPendingAnimations](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#runPendingAnimations())is requested, false otherwise. |

### canReuseUpdatedViewHolder

```
fun canReuseUpdatedViewHolder(viewHolder: RecyclerView.ViewHolder): Boolean
```

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. cross-fade).

Note that this method will only be called if the still has the same type ( Adapter#getItemViewType(int)). Otherwise, ItemAnimator will always receive both s in the #animateChange(ViewHolder, ViewHolder, ItemHolderInfo, ItemHolderInfo) method.

If your application is using change payloads, you can override #canReuseUpdatedViewHolder(ViewHolder, List) to decide based on payloads.  

|                                       Returns                                       |
|-------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | True if change animations are not supported or the ViewHolder is invalid, false otherwise. |

|                                                                              See also                                                                              |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [setSupportsChangeAnimations](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#setSupportsChangeAnimations(boolean)) |   |

### dispatchAddFinished

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.0.0)  

```
fun dispatchAddFinished(item: RecyclerView.ViewHolder!): Unit
```

Method to be called by subclasses when an add animation is done.  

|                                                                Parameters                                                                 |
|-------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------|
| `item: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!` | The item which has been added |

### dispatchAddStarting

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.0.0)  

```
fun dispatchAddStarting(item: RecyclerView.ViewHolder!): Unit
```

Method to be called by subclasses when an add animation is being started.  

|                                                                Parameters                                                                 |
|-------------------------------------------------------------------------------------------------------------------------------------------|----------------------|
| `item: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!` | The item being added |

### dispatchChangeFinished

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.0.0)  

```
fun dispatchChangeFinished(item: RecyclerView.ViewHolder!, oldItem: Boolean): Unit
```

Method to be called by subclasses when a change animation is done.  

|                                                                Parameters                                                                 |
|-------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `item: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!` | The item which has been changed (this method must be called for each non-null ViewHolder passed into[animateChange](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#animateChange(androidx.recyclerview.widget.RecyclerView.ViewHolder,androidx.recyclerview.widget.RecyclerView.ViewHolder,int,int,int,int))). |
| `oldItem: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                            | true if this is the old item that was changed, false if it is the new item that replaced the old item.                                                                                                                                                                                                                                                         |

|                                                                                                                         See also                                                                                                                         |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [animateChange](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#animateChange(androidx.recyclerview.widget.RecyclerView.ViewHolder,androidx.recyclerview.widget.RecyclerView.ViewHolder,int,int,int,int)) |   |

### dispatchChangeStarting

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.0.0)  

```
fun dispatchChangeStarting(item: RecyclerView.ViewHolder!, oldItem: Boolean): Unit
```

Method to be called by subclasses when a change animation is being started.  

|                                                                Parameters                                                                 |
|-------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `item: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!` | The item which has been changed (this method must be called for each non-null ViewHolder passed into[animateChange](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#animateChange(androidx.recyclerview.widget.RecyclerView.ViewHolder,androidx.recyclerview.widget.RecyclerView.ViewHolder,int,int,int,int))). |
| `oldItem: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                            | true if this is the old item that was changed, false if it is the new item that replaced the old item.                                                                                                                                                                                                                                                         |

### dispatchMoveFinished

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.0.0)  

```
fun dispatchMoveFinished(item: RecyclerView.ViewHolder!): Unit
```

Method to be called by subclasses when a move animation is done.  

|                                                                Parameters                                                                 |
|-------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------|
| `item: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!` | The item which has been moved |

|                                                                                                                                                                       See also                                                                                                                                                                       |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [animateDisappearance](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#animateDisappearance(androidx.recyclerview.widget.RecyclerView.ViewHolder,androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo,androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo)) |   |
| [animatePersistence](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#animatePersistence(androidx.recyclerview.widget.RecyclerView.ViewHolder,androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo,androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo))     |   |
| [animateAppearance](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#animateAppearance(androidx.recyclerview.widget.RecyclerView.ViewHolder,androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo,androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo))       |   |

### dispatchMoveStarting

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.0.0)  

```
fun dispatchMoveStarting(item: RecyclerView.ViewHolder!): Unit
```

Method to be called by subclasses when a move animation is being started.  

|                                                                Parameters                                                                 |
|-------------------------------------------------------------------------------------------------------------------------------------------|----------------------|
| `item: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!` | The item being moved |

### dispatchRemoveFinished

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.0.0)  

```
fun dispatchRemoveFinished(item: RecyclerView.ViewHolder!): Unit
```

Method to be called by subclasses when a remove animation is done.  

|                                                                Parameters                                                                 |
|-------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------|
| `item: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!` | The item which has been removed |

|                                                                                                                                                                       See also                                                                                                                                                                       |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [animateDisappearance](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ItemAnimator#animateDisappearance(androidx.recyclerview.widget.RecyclerView.ViewHolder,androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo,androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo)) |   |

### dispatchRemoveStarting

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.0.0)  

```
fun dispatchRemoveStarting(item: RecyclerView.ViewHolder!): Unit
```

Method to be called by subclasses when a remove animation is being started.  

|                                                                Parameters                                                                 |
|-------------------------------------------------------------------------------------------------------------------------------------------|------------------------|
| `item: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!` | The item being removed |

### getSupportsChangeAnimations

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.0.0)  

```
fun getSupportsChangeAnimations(): Boolean
```

Returns whether this ItemAnimator supports animations of change events.  

|                                       Returns                                       |
|-------------------------------------------------------------------------------------|----------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | true if change animations are supported, false otherwise |

### onAddFinished

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.0.0)  

```
fun onAddFinished(item: RecyclerView.ViewHolder!): Unit
```

Called when an add animation has ended on the given ViewHolder. The default implementation does nothing. Subclasses may wish to override this method to handle any ViewHolder-specific operations linked to animation lifecycles.  

|                                                                Parameters                                                                 |
|-------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------|
| `item: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!` | The ViewHolder being animated. |

### onAddStarting

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.0.0)  

```
fun onAddStarting(item: RecyclerView.ViewHolder!): Unit
```

Called when an add animation is being started on the given ViewHolder. The default implementation does nothing. Subclasses may wish to override this method to handle any ViewHolder-specific operations linked to animation lifecycles.  

|                                                                Parameters                                                                 |
|-------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------|
| `item: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!` | The ViewHolder being animated. |

### onChangeFinished

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.0.0)  

```
fun onChangeFinished(item: RecyclerView.ViewHolder!, oldItem: Boolean): Unit
```

Called when a change animation has ended on the given ViewHolder. The default implementation does nothing. Subclasses may wish to override this method to handle any ViewHolder-specific operations linked to animation lifecycles.  

|                                                                Parameters                                                                 |
|-------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------|
| `item: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!` | The ViewHolder being animated.                                                                         |
| `oldItem: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                            | true if this is the old item that was changed, false if it is the new item that replaced the old item. |

### onChangeStarting

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.0.0)  

```
fun onChangeStarting(item: RecyclerView.ViewHolder!, oldItem: Boolean): Unit
```

Called when a change animation is being started on the given ViewHolder. The default implementation does nothing. Subclasses may wish to override this method to handle any ViewHolder-specific operations linked to animation lifecycles.  

|                                                                Parameters                                                                 |
|-------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------|
| `item: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!` | The ViewHolder being animated.                                                                         |
| `oldItem: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                            | true if this is the old item that was changed, false if it is the new item that replaced the old item. |

### onMoveFinished

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.0.0)  

```
fun onMoveFinished(item: RecyclerView.ViewHolder!): Unit
```

Called when a move animation has ended on the given ViewHolder. The default implementation does nothing. Subclasses may wish to override this method to handle any ViewHolder-specific operations linked to animation lifecycles.  

|                                                                Parameters                                                                 |
|-------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------|
| `item: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!` | The ViewHolder being animated. |

### onMoveStarting

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.0.0)  

```
fun onMoveStarting(item: RecyclerView.ViewHolder!): Unit
```

Called when a move animation is being started on the given ViewHolder. The default implementation does nothing. Subclasses may wish to override this method to handle any ViewHolder-specific operations linked to animation lifecycles.  

|                                                                Parameters                                                                 |
|-------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------|
| `item: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!` | The ViewHolder being animated. |

### onRemoveFinished

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.0.0)  

```
fun onRemoveFinished(item: RecyclerView.ViewHolder!): Unit
```

Called when a remove animation has ended on the given ViewHolder. The default implementation does nothing. Subclasses may wish to override this method to handle any ViewHolder-specific operations linked to animation lifecycles.  

|                                                                Parameters                                                                 |
|-------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------|
| `item: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!` | The ViewHolder being animated. |

### onRemoveStarting

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.0.0)  

```
fun onRemoveStarting(item: RecyclerView.ViewHolder!): Unit
```

Called when a remove animation is being started on the given ViewHolder. The default implementation does nothing. Subclasses may wish to override this method to handle any ViewHolder-specific operations linked to animation lifecycles.  

|                                                                Parameters                                                                 |
|-------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------|
| `item: `[RecyclerView.ViewHolder](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder)`!` | The ViewHolder being animated. |

### setSupportsChangeAnimations

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.0.0)  

```
fun setSupportsChangeAnimations(supportsChangeAnimations: Boolean): Unit
```

Sets whether this ItemAnimator supports animations of item change events. If you set this property to false, actions on the data set which change the contents of items will not be animated. What those animations do is left up to the discretion of the ItemAnimator subclass, in its[animateChange](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#animateChange(androidx.recyclerview.widget.RecyclerView.ViewHolder,androidx.recyclerview.widget.RecyclerView.ViewHolder,int,int,int,int))implementation. The value of this property is true by default.  

|                                                   Parameters                                                    |
|-----------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `supportsChangeAnimations: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | true if change animations are supported by this ItemAnimator, false otherwise. If the property is false, the ItemAnimator will not receive a call to[animateChange](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/SimpleItemAnimator#animateChange(androidx.recyclerview.widget.RecyclerView.ViewHolder,androidx.recyclerview.widget.RecyclerView.ViewHolder,int,int,int,int))when changes occur. |

|                                                                          See also                                                                          |
|------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [notifyItemChanged](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.Adapter#notifyItemChanged(int))               |   |
| [notifyItemRangeChanged](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.Adapter#notifyItemRangeChanged(int,int)) |   |