Save the date! Android Dev Summit is coming to Sunnyvale, CA on Oct 23-24, 2019.

ParcelableArrayType

class ParcelableArrayType<D : Parcelable!> : NavType<Array<D>!>
kotlin.Any
   ↳ androidx.navigation.NavType<kotlin.Array<D>>
   ↳ androidx.navigation.NavType.ParcelableArrayType

ParcelableArrayType is used for NavArguments which hold arrays of Parcelables.

Null values are supported. Default values in Navigation XML files are not supported.

Summary

Public constructors
<init>(@NonNull type: Class<D>)

Constructs a NavType that supports arrays of a given Parcelable type.

Public methods
Array<D>
parseValue(@NonNull value: String)

Int

Unit
put(@NonNull bundle: Bundle, @NonNull key: String, @Nullable value: Array<D>?)

Boolean
equals(other: Any?)

String

Array<D>?
get(@NonNull bundle: Bundle, @NonNull key: String)

Inherited functions
Inherited properties

Public constructors

<init>

ParcelableArrayType(@NonNull type: Class<D>)

Constructs a NavType that supports arrays of a given Parcelable type.

Parameters
type Class<D>: class that is a subtype of Parcelable

Public methods

parseValue

@NonNull fun parseValue(@NonNull value: String): Array<D>

hashCode

fun hashCode(): Int

put

fun put(@NonNull bundle: Bundle, @NonNull key: String, @Nullable value: Array<D>?): Unit

equals

fun equals(other: Any?): Boolean

getName

@NonNull fun getName(): String

get

@Nullable fun get(@NonNull bundle: Bundle, @NonNull key: String): Array<D>?