NavType.SerializableType
-
android
open class NavType.SerializableType<D : Serializable> : NavType
NavType.EnumType |
EnumType is used for |
SerializableType is used for Serializable NavArguments. For handling Enums you must use EnumType instead.
Null values are supported. Default values in Navigation XML files are not supported.
| See also | |
|---|---|
NavType.EnumType |
Summary
Public constructors |
|
|---|---|
<D : Serializable> SerializableType(type: Class<D>)Constructs a NavType that supports a given Serializable type. |
android
|
Public functions |
||
|---|---|---|
open operator Boolean |
android
|
|
open operator D? |
Get a value of this type from the |
android
|
open Int |
hashCode() |
android
|
open D |
parseValue(value: String) |
android
|
open Unit |
Put a value of this type in the |
android
|
Inherited functions |
||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Inherited properties |
|||
|---|---|---|---|
|
Public constructors
SerializableType
<D : Serializable> SerializableType(type: Class<D>)
Constructs a NavType that supports a given Serializable type.
| Parameters | |
|---|---|
type: Class<D> |
class that is a subtype of Serializable |
Public functions
get
open operator fun get(bundle: Bundle, key: String): D?
Get a value of this type from the savedState
| Returns | |
|---|---|
D? |
value of this type |
parseValue
open fun parseValue(value: String): D
| Throws | |
|---|---|
UnsupportedOperationException |
since Serializables do not support default values |