Added in API level 1

AbsSavedState


abstract class AbsSavedState : Parcelable
Preference.BaseSavedState

A base class for managing the instance state of a Preference.

View.BaseSavedState

Base class for derived classes that want to save and restore their own state in android.view.View#onSaveInstanceState().

TextView.SavedState

User interface state that is stored by TextView for implementing View.onSaveInstanceState.

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

Summary

Inherited constants
Int CONTENTS_FILE_DESCRIPTOR

Descriptor bit used with describeContents(): indicates that the Parcelable object's flattened representation includes a file descriptor.

Int PARCELABLE_WRITE_RETURN_VALUE

Flag for use with writeToParcel: the object being written is a return value, that is the result of a function such as "Parcelable someFunction()", "void someFunction(out Parcelable)", or "void someFunction(inout Parcelable)". Some implementations may want to release resources at this point.

Protected constructors

Constructor used when reading from a parcel.

AbsSavedState(source: Parcel!, loader: ClassLoader!)

Constructor used when reading from a parcel using a given class loader.

AbsSavedState(superState: Parcelable!)

Constructor called by derived classes when creating their SavedState objects

Public methods
open Int

Parcelable!

open Unit
writeToParcel(dest: Parcel, flags: Int)

Protected constructors

AbsSavedState

Added in API level 1
protected AbsSavedState(source: Parcel!)

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

Parameters
source Parcel!: parcel to read from

AbsSavedState

Added in API level 24
protected AbsSavedState(
    source: Parcel!,
    loader: ClassLoader!)

Constructor used when reading from a parcel using a given class loader. Reads the state of the superclass.

Parameters
source Parcel!: parcel to read from
loader ClassLoader!: ClassLoader to use for reading

AbsSavedState

Added in API level 1
protected AbsSavedState(superState: Parcelable!)

Constructor called by derived classes when creating their SavedState objects

Parameters
superState Parcelable!: The state of the superclass of this view

Public methods

describeContents

Added in API level 1
open fun describeContents(): Int
Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

getSuperState

Added in API level 1
fun getSuperState(): Parcelable!

writeToParcel

Added in API level 1
open fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit
Parameters
dest Parcel: The Parcel in which the object should be written. This value cannot be null.
flags Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties

CREATOR

Added in API level 1
static val CREATOR: Parcelable.Creator<AbsSavedState!>

EMPTY_STATE

Added in API level 1
static val EMPTY_STATE: AbsSavedState!