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

SerializableArrayType

class SerializableArrayType<D : Serializable!> : NavType<Array<D>!>
kotlin.Any
   ↳ androidx.navigation.NavType<kotlin.Array<D>>
   ↳ androidx.navigation.NavType.SerializableArrayType

SerializableArrayType is used for NavArguments that hold arrays of Serializables. This type also supports arrays of Enums.

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 Serializable type.

Public methods

Boolean
equals(other: Any?)

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

String

Int

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

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

Inherited functions

Inherited properties

Public constructors

<init>

SerializableArrayType(@NonNull type: Class<D>)

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

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

Public methods

equals

fun equals(other: Any?): Boolean

get

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

getName

@NonNull fun getName(): String

hashCode

fun hashCode(): Int

parseValue

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

put

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