Android Dev Summit, October 23-24: two days of technical content, directly from the Android team. Sign-up for livestream updates.

ParcelCompat

class ParcelCompat
kotlin.Any
   ↳ androidx.core.os.ParcelCompat

Helper for accessing features in Parcel.

Summary

Public methods

static Boolean
readBoolean(@NonNull in: Parcel)

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

static Unit
writeBoolean(@NonNull out: Parcel, value: Boolean)

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

Public methods

readBoolean

static fun readBoolean(@NonNull in: Parcel): Boolean

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

writeBoolean

static fun writeBoolean(@NonNull out: Parcel, value: Boolean): Unit

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 with a value of 1 or 0 for true or false, respectively, but may change in the future.