Stay organized with collections Save and categorize content based on your preferences.

AbsSavedState

public abstract class AbsSavedState implements Parcelable

Known direct subclasses
CoordinatorLayout.SavedState
DrawerLayout.SavedState

State persisted across instances

Toolbar.SavedState
ViewPager.SavedState

This is the persistent state that is saved by ViewPager.


A Parcelable implementation that should be used by inheritance hierarchies to ensure the state of all classes along the chain is saved.

Summary

Constants

static final Parcelable.Creator<AbsSavedState>
static final AbsSavedState

Protected constructors

Constructor used when reading from a parcel.

Constructor called by derived classes when creating their SavedState objects

Constructor used when reading from a parcel.

Public methods

int
final @Nullable Parcelable
void
writeToParcel(Parcel dest, int flags)

Inherited Constants

From android.os.Parcelable
static final int
static final int

Constants

CREATOR

public static final Parcelable.Creator<AbsSavedStateCREATOR

EMPTY_STATE

public static final AbsSavedState EMPTY_STATE

Protected constructors

AbsSavedState

protected AbsSavedState(@NonNull Parcel source)

Constructor used when reading from a parcel. Reads the state of the superclass.

Parameters
@NonNull Parcel source

parcel to read from

AbsSavedState

protected AbsSavedState(@NonNull Parcelable superState)

Constructor called by derived classes when creating their SavedState objects

Parameters
@NonNull Parcelable superState

The state of the superclass of this view

AbsSavedState

protected AbsSavedState(@NonNull Parcel source, @Nullable ClassLoader loader)

Constructor used when reading from a parcel. Reads the state of the superclass.

Parameters
@NonNull Parcel source

parcel to read from

@Nullable ClassLoader loader

ClassLoader to use for reading

Public methods

describeContents

public int describeContents()

getSuperState

public final @Nullable Parcelable getSuperState()

writeToParcel

public void writeToParcel(Parcel dest, int flags)