lightbulb_outline Please take our October 2018 developer survey. Start survey
added in version 1.0.0
belongs to Maven artifact androidx.core:core:1.0.0

ParcelCompat

public final class ParcelCompat
extends Object

java.lang.Object
   ↳ androidx.core.os.ParcelCompat


Helper for accessing features in Parcel.

Summary

Public methods

static boolean readBoolean(Parcel in)

Read a boolean value from the parcel at the current Parcel.dataPosition().

static void writeBoolean(Parcel out, boolean value)

Write a boolean value into the parcel at the current Parcel.dataPosition(), growing Parcel.dataCapacity() if needed.

Inherited methods

Public methods

readBoolean

added in version 1.0.0
public static boolean readBoolean (Parcel in)

Read a boolean value from the parcel at the current Parcel.dataPosition().

Parameters
in Parcel

Returns
boolean

writeBoolean

added in version 1.0.0
public static void writeBoolean (Parcel out, 
                boolean value)

Write a boolean value into the parcel at the current Parcel.dataPosition(), growing Parcel.dataCapacity() if needed.

Note: This method currently delegates to Parcel.writeInt(int) with a value of 1 or 0 for true or false, respectively, but may change in the future.

Parameters
out Parcel

value boolean