setRecycleChildrenOnDetach

open fun setRecycleChildrenOnDetach(recycleChildrenOnDetach: Boolean)(source)

Set whether LayoutManager will recycle its children when it is detached from RecyclerView.

If you are using a RecyclerView.RecycledViewPool, it might be a good idea to set this flag to true so that views will be available to other RecyclerViews immediately.

Note that, setting this flag will result in a performance drop if RecyclerView is restored.

Parameters

recycleChildrenOnDetach

Whether children should be recycled in detach or not.