getWrappedAdapterAndPosition
open fun getWrappedAdapterAndPosition(globalPosition: Int): Pair<RecyclerView.Adapter<out RecyclerView.ViewHolder>, Integer>(source)
Retrieve the adapter and local position for a given position in this ConcatAdapter
. This allows for retrieving wrapped adapter information in situations where you don't have a ViewHolder, such as within a androidx.recyclerview.widget.GridLayoutManager.SpanSizeLookup in which you want to look up information from the source adapter.
Return
a Pair with the first element set to the wrapped Adapter
containing that position and the second element set to the local position in the wrapped adapter
Parameters
globalPosition
The position in this ConcatAdapter
.
Throws
if the specified globalPosition
does not correspond to a valid element of this adapter. That is, if globalPosition
is less than 0 or greater than the total number of items in the ConcatAdapter