StatefulAdapter

public interface StatefulAdapter

androidx.viewpager2.adapter.StatefulAdapter


ViewPager2 adapters should implement this interface to be called during View.onSaveInstanceState() and View.onRestoreInstanceState(Parcelable)

Summary

Public methods

abstract void restoreState(Parcelable savedState)

Restores adapter state

abstract Parcelable saveState()

Saves adapter state

Public methods

restoreState

public abstract void restoreState (Parcelable savedState)

Restores adapter state

Parameters
savedState Parcelable

saveState

public abstract Parcelable saveState ()

Saves adapter state

Returns
Parcelable