共用方式為


IParcelableCreator.CreateFromParcel(Parcel) Method

Definition

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

[Android.Runtime.Register("createFromParcel", "(Landroid/os/Parcel;)Ljava/lang/Object;", "GetCreateFromParcel_Landroid_os_Parcel_Handler:Android.OS.IParcelableCreatorInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Java.Lang.Object? CreateFromParcel (Android.OS.Parcel? source);
[<Android.Runtime.Register("createFromParcel", "(Landroid/os/Parcel;)Ljava/lang/Object;", "GetCreateFromParcel_Landroid_os_Parcel_Handler:Android.OS.IParcelableCreatorInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member CreateFromParcel : Android.OS.Parcel -> Java.Lang.Object

Parameters

source
Parcel

The Parcel to read the object's data from.

Returns

Returns a new instance of the Parcelable class.

Attributes

Remarks

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

Java documentation for android.os.Parcelable.Creator.createFromParcel(android.os.Parcel).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to