setPrimaryItem

open fun setPrimaryItem(@NonNull container: @NonNull ViewGroup, position: Int, @NonNull object: @NonNull Any)

Called to inform the adapter of which item is currently considered to be the "primary", that is the one show to the user as the current page. This method will not be invoked when the adapter contains no items.

Parameters

container

The containing View from which the page will be removed.

position

The page position that is now the primary.

object

The same object that was returned by instantiateItem.


open fun setPrimaryItem(@NonNull container: @NonNull View, position: Int, @NonNull object: @NonNull Any)

Deprecated

Use setPrimaryItem

Called to inform the adapter of which item is currently considered to be the "primary", that is the one show to the user as the current page.

Parameters

container

The containing View from which the page will be removed.

position

The page position that is now the primary.

object

The same object that was returned by instantiateItem.