bindViewToPosition

open fun bindViewToPosition(@NonNull view: View, position: Int)(source)

Binds the given View to the position. The View can be a View previously retrieved via getViewForPosition or created by onCreateViewHolder.

Generally, a LayoutManager should acquire its views via getViewForPosition and let the RecyclerView handle caching. This is a helper method for LayoutManager who wants to handle its own recycling logic.

Note that, getViewForPosition already binds the View to the position so you don't need to call this method unless you want to bind this View to another position.

Parameters

view

The view to update.

position

The position of the item to bind to this View.