addDisappearingView
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
View to add and then remove with animation.
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
View to add and then remove with animation.
Index of the view.