The Android Developer Challenge is back! Submit your idea before December 2.

ParcelableType

class ParcelableType<D : Any!> : NavType<D>
kotlin.Any
   ↳ androidx.navigation.NavType<D>
   ↳ androidx.navigation.NavType.ParcelableType

ParcelableType is used for passing Parcelables in NavArguments.

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 a given Parcelable type.

Public methods

Boolean
equals(other: Any?)

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

String

Int

D
parseValue(@NonNull value: String)

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

Inherited functions

Inherited properties

Public constructors

<init>

ParcelableType(@NonNull type: Class<D>)

Constructs a NavType that supports a given Parcelable type.

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

Public methods

equals

fun equals(other: Any?): Boolean

get

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

getName

@NonNull fun getName(): String

hashCode

fun hashCode(): Int

parseValue

@NonNull fun parseValue(@NonNull value: String): D

put

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