Share via


Parcel.WriteParcelableArray(Object[], ParcelableWriteFlags) Method

Definition

Write a heterogeneous array of Parcelable objects into the Parcel.

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

Parameters

value
Object[]

The array of objects to be written.

parcelableFlags
ParcelableWriteFlags

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

Attributes

Remarks

Write a heterogeneous array of Parcelable objects into the Parcel. Each object in the array is written along with its class name, so that the correct class can later be instantiated. As a result, this has significantly more overhead than #writeTypedArray, but will correctly handle an array containing more than one type of object.

Java documentation for android.os.Parcel.writeParcelableArray(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