StatefulAdapter


interface StatefulAdapter

Known direct subclasses

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

Summary

Public functions

Unit
restoreState(savedState: Parcelable)

Restores adapter state

Parcelable

Saves adapter state

Public functions

restoreState

Added in 1.0.0
fun restoreState(savedState: Parcelable): Unit

Restores adapter state

saveState

Added in 1.0.0
fun saveState(): Parcelable

Saves adapter state