StatefulAdapter


public interface StatefulAdapter

Known direct subclasses

ViewPager2 adapters should implement this interface to be called during onSaveInstanceState and onRestoreInstanceState

Summary

Public methods

abstract void

Restores adapter state

abstract @NonNull Parcelable

Saves adapter state

Public methods

restoreState

Added in 1.0.0
abstract void restoreState(@NonNull Parcelable savedState)

Restores adapter state

saveState

Added in 1.0.0
abstract @NonNull Parcelable saveState()

Saves adapter state