次の方法で共有


Parcel.WriteTypedArray(Object[], ParcelableWriteFlags) Method

Definition

Flatten a homogeneous array containing a particular object type into the parcel, at the current dataPosition() and growing dataCapacity() if needed.

[Android.Runtime.Register("writeTypedArray", "([Landroid/os/Parcelable;I)V", "")]
[Java.Interop.JavaTypeParameters(new System.String[] { "T extends android.os.Parcelable" })]
public void WriteTypedArray (Java.Lang.Object[]? val, Android.OS.ParcelableWriteFlags parcelableFlags);
[<Android.Runtime.Register("writeTypedArray", "([Landroid/os/Parcelable;I)V", "")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T extends android.os.Parcelable" })>]
member this.WriteTypedArray : Java.Lang.Object[] * Android.OS.ParcelableWriteFlags -> unit

Parameters

val
Object[]

The array of objects to be written.

parcelableFlags
ParcelableWriteFlags

Contextual flags as per Parcelable#writeToParcel(Parcel, int) Parcelable.writeToParcel().

Attributes

Remarks

Flatten a homogeneous array containing a particular object type into the parcel, at the current dataPosition() and growing dataCapacity() if needed. The type of the objects in the array must be one that implements Parcelable. Unlike the #writeParcelableArray method, however, only the raw data of the objects is written and not their type, so you must use #readTypedArray with the correct corresponding Parcelable.Creator implementation to unmarshall them.

Java documentation for android.os.Parcel.writeTypedArray(T[], int).

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