addDisappearingView

open fun addDisappearingView(child: View)(source)

To be called only during onLayoutChildren to add a view to the layout that is known to be going away, either because it has been removed or because it is actually not in the visible portion of the container but is being laid out in order to inform RecyclerView in how to animate the item out of view.

Views added via this method are going to be invisible to LayoutManager after the dispatchLayout pass is complete. They cannot be retrieved via getChildAt or won't be included in getChildCount method.

Parameters

child

View to add and then remove with animation.


open fun addDisappearingView(child: View, index: Int)(source)

To be called only during onLayoutChildren to add a view to the layout that is known to be going away, either because it has been removed or because it is actually not in the visible portion of the container but is being laid out in order to inform RecyclerView in how to animate the item out of view.

Views added via this method are going to be invisible to LayoutManager after the dispatchLayout pass is complete. They cannot be retrieved via getChildAt or won't be included in getChildCount method.

Parameters

child

View to add and then remove with animation.

index

Index of the view.