getViewForPositionAndType

abstract fun getViewForPositionAndType(@NonNull recycler: RecyclerView.Recycler, position: Int, type: Int): View(source)

Returns a View that can be binded to the given Adapter position.

This method should not create a new View. Instead, it is expected to return an already created View that can be re-used for the given type and position. If the View is marked as ignored, it should first call stopIgnoringView before returning the View.

RecyclerView will re-bind the returned View to the position if necessary.

Return

A View that is bound to the given position or NULL if there is no View to re-use

Parameters

recycler

The Recycler that can be used to bind the View

position

The adapter position

type

The type of the View, defined by adapter

See also