Android 12 Developer Preview is here! Try it out, and give us your feedback!

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