Skip to content

Most visited

Recently visited

navigation
Added in API level 1

Parcelable.Creator

public static interface Parcelable.Creator

android.os.Parcelable.Creator<T>
Known Indirect Subclasses


Interface that must be implemented and provided as a public CREATOR field that generates instances of your Parcelable class from a Parcel.

Summary

Public methods

abstract T createFromParcel(Parcel source)

Create a new instance of the Parcelable class, instantiating it from the given Parcel whose data had previously been written by Parcelable.writeToParcel().

abstract T[] newArray(int size)

Create a new array of the Parcelable class.

Public methods

createFromParcel

Added in API level 1
T createFromParcel (Parcel source)

Create a new instance of the Parcelable class, instantiating it from the given Parcel whose data had previously been written by Parcelable.writeToParcel().

Parameters
source Parcel: The Parcel to read the object's data from.
Returns
T Returns a new instance of the Parcelable class.

newArray

Added in API level 1
T[] newArray (int size)

Create a new array of the Parcelable class.

Parameters
size int: Size of the array.
Returns
T[] Returns an array of the Parcelable class, with every entry initialized to null.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.