NavType.ParcelableType
public final class NavType.ParcelableType<D extends Object> extends NavType
ParcelableType is used for passing Parcelables in NavArguments.
Null values are supported. Default values in Navigation XML files are not supported.
Summary
Public constructors |
|---|
<D extends Object> ParcelableType(@NonNull Class<@NonNull D> type) |
Public methods |
|
|---|---|
boolean |
|
D |
Get a value of this type from the |
@NonNull String |
getName()The name of this type. |
int |
hashCode() |
@NonNull D |
parseValue(@NonNull String value) |
void |
Put a value of this type in the |
Inherited methods |
||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
Public constructors
Public methods
get
public D get(@NonNull Bundle bundle, @NonNull String key)
Get a value of this type from the savedState
| Returns | |
|---|---|
D |
value of this type |
getName
public @NonNull String getName()
The name of this type.
This is the same value that is used in Navigation XML argType attribute.
parseValue
public @NonNull D parseValue(@NonNull String value)
| Throws | |
|---|---|
UnsupportedOperationException |
since Parcelables do not support default values |