NavType.ParcelableArrayType

public final class NavType.ParcelableArrayType<D extends Parcelable> extends NavType

Object
   ↳ NavType
     ↳ 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 fields

@NonNull String

The name of this type.

Public constructors

<D extends Parcelable> ParcelableArrayType(Class<D> type)

Public methods

boolean
equals(Object other)
D[]
get(Bundle bundle, String key)

Get a value of this type from the bundle

int
D[]
void
put(Bundle bundle, String key, D[] value)

Put a value of this type in the bundle

Inherited methods

From class NavType

Public fields

name

public @NonNull String name

The name of this type.

This is the same value that is used in Navigation XML argType attribute.

Returns
@NonNull String

name of this type

Public constructors

ParcelableArrayType

public final <D extends Parcelable> ParcelableArrayType(Class<D> type)
Parameters
Class<D> type

the type of Parcelable component class of the array

Public methods

equals

public boolean equals(Object other)

get

public D[] get(Bundle bundle, String key)

Get a value of this type from the bundle

Parameters
Bundle bundle

bundle to get value from

String key

bundle key

Returns
D[]

value of this type

hashCode

public int hashCode()

parseValue

public D[] parseValue(String value)
Throws
kotlin.UnsupportedOperationException

since Arrays do not support default values

put

public void put(Bundle bundle, String key, D[] value)

Put a value of this type in the bundle

Parameters
Bundle bundle

bundle to put value in

String key

bundle key

D[] value

value of this type