getItemPosition

open fun getItemPosition(@NonNull object: Any): Int

Returns the position of an item in the adapter. Used by the ViewPager to determine if an item has been moved or removed.

Return

The position of the item, or POSITION_NONE if the item is not in the adapter.

Parameters

object

The item to get the position of.