detachView

open fun detachView(@NonNull child: View)(source)

Temporarily detach a child view.

LayoutManagers may want to perform a lightweight detach operation to rearrange views currently attached to the RecyclerView. Generally LayoutManager implementations will want to use detachAndScrapView so that the detached view may be rebound and reused.

If a LayoutManager uses this method to detach a view, it mustreattach or fully remove the detached view before the LayoutManager entry point method called by RecyclerView returns.

Parameters

child

Child to detach