# Preference.BaseSavedState

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Deprecated in[API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# BaseSavedState

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/preference/Preference.BaseSavedState "View this page in Java")  

```
open class BaseSavedState : AbsSavedState
```

|---|---|----------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                  |||
| ↳ | [android.view.AbsSavedState](https://developer.android.com/reference/kotlin/android/view/AbsSavedState.html#)                                   ||
|   | ↳ | [android.preference.Preference.BaseSavedState](https://developer.android.com/reference/kotlin/android/preference/Preference.BaseSavedState#) |

*** ** * ** ***

| **This class was deprecated in API level 29.**
|
| Use the[AndroidX](https://developer.android.com/jetpack/androidx.html)[Preference Library](https://developer.android.com/reference/androidx/preference/package-summary.html)for consistent behavior across all devices. For more information on using the AndroidX Preference Library see[Settings](https://developer.android.com/guide/topics/ui/settings.html).

A base class for managing the instance state of a[Preference](https://developer.android.com/reference/kotlin/android/preference/Preference).

## Summary

| Inherited constants ||
|---|---|
| From class[Parcelable](https://developer.android.com/reference/kotlin/android/os/Parcelable.html#) |----------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [CONTENTS_FILE_DESCRIPTOR](https://developer.android.com/reference/kotlin/android/os/Parcelable.html#CONTENTS_FILE_DESCRIPTOR:kotlin.Int) <br /> Descriptor bit used with[describeContents()](https://developer.android.com/reference/kotlin/android/os/Parcelable.html#describeContents()): indicates that the Parcelable object's flattened representation includes a file descriptor. <br />                                                                                                                                                                                                        | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [PARCELABLE_WRITE_RETURN_VALUE](https://developer.android.com/reference/kotlin/android/os/Parcelable.html#PARCELABLE_WRITE_RETURN_VALUE:kotlin.Int) <br /> Flag for use with[writeToParcel](https://developer.android.com/reference/kotlin/android/os/Parcelable.html#writeToParcel(android.os.Parcel,%20kotlin.Int)): 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. <br /> | ||

|                                                                                                                            Public constructors                                                                                                                             ||
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [BaseSavedState](https://developer.android.com/reference/kotlin/android/preference/Preference.BaseSavedState#BaseSavedState(android.os.Parcel))`(`source:` `[Parcel](https://developer.android.com/reference/kotlin/android/os/Parcel.html#)!`)` <br />                 |
| [BaseSavedState](https://developer.android.com/reference/kotlin/android/preference/Preference.BaseSavedState#BaseSavedState(android.os.Parcelable))`(`superState:` `[Parcelable](https://developer.android.com/reference/kotlin/android/os/Parcelable.html#)!`)` <br /> |

| Inherited functions ||
|---|---|
| From class[AbsSavedState](https://developer.android.com/reference/kotlin/android/view/AbsSavedState.html#) |-------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                | [describeContents](https://developer.android.com/reference/kotlin/android/view/AbsSavedState.html#describeContents())`()` <br />                                                                                                                                                                                                           | | [Parcelable](https://developer.android.com/reference/kotlin/android/os/Parcelable.html#)! | [getSuperState](https://developer.android.com/reference/kotlin/android/view/AbsSavedState.html#getSuperState())`()` <br />                                                                                                                                                                                                                 | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)              | [writeToParcel](https://developer.android.com/reference/kotlin/android/view/AbsSavedState.html#writeToParcel(android.os.Parcel,%20kotlin.Int))`(`dest:` `[Parcel](https://developer.android.com/reference/kotlin/android/os/Parcel.html#)`, `flags:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> | ||

|                                                                                                                                                                                            Properties                                                                                                                                                                                             ||
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|
| static[Parcelable.Creator](https://developer.android.com/reference/kotlin/android/os/Parcelable.Creator.html#)\<[Preference.BaseSavedState](https://developer.android.com/reference/kotlin/android/preference/Preference.BaseSavedState#)!\> | [CREATOR](https://developer.android.com/reference/kotlin/android/preference/Preference.BaseSavedState#CREATOR:android.os.Parcelable.Creator) <br /> |

| Inherited properties ||
|---|---|
| From class[AbsSavedState](https://developer.android.com/reference/kotlin/android/view/AbsSavedState.html#) |---------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------| | [AbsSavedState](https://developer.android.com/reference/kotlin/android/view/AbsSavedState.html#)! | [EMPTY_STATE](https://developer.android.com/reference/kotlin/android/view/AbsSavedState.html#EMPTY_STATE:android.view.AbsSavedState) <br /> | ||

## Public constructors

### BaseSavedState

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
BaseSavedState(source: Parcel!)
```  

### BaseSavedState

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
BaseSavedState(superState: Parcelable!)
```

## Properties

### CREATOR

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val CREATOR: Parcelable.Creator<Preference.BaseSavedState!>
```

**Deprecated:** *Deprecated in Java.*