findRelativeAdapterPositionIn
open fun findRelativeAdapterPositionIn(@NonNull adapter: RecyclerView.Adapter<out RecyclerView.ViewHolder>, @NonNull viewHolder: RecyclerView.ViewHolder, localPosition: Int): Int(source)
Returns the position of the given ViewHolder in the given Adapter. If the given Adapter is not part of this Adapter, NO_POSITION is returned.
Return
The local position of the given ViewHolder in this Adapter or NO_POSITION if the ViewHolder is not bound to an item or the given Adapter is not part of this Adapter (if this Adapter merges other adapters).
Parameters
adapter
The adapter which is a sub adapter of this adapter or itself.
viewHolder
The ViewHolder whose local position in the given adapter will be returned.
localPosition
The position of the given ViewHolder in this Adapter.