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

EnumType

class EnumType<D : Enum<Enum<*>>!> : NavType.SerializableType<D>
kotlin.Any
   ↳ androidx.navigation.NavType<D>
   ↳ androidx.navigation.NavType.SerializableType<D>
   ↳ androidx.navigation.NavType.EnumType

EnumType is used for NavArguments holding enum values.

Null values are not supported. To specify a default value in a Navigation XML file, simply use the enum constant without the class name, e.g. `app:defaultValue="MONDAY"`.

Summary

Public constructors
<init>(@NonNull type: Class<D>)

Constructs a NavType that supports a given Enum type.

Public methods
String

D
parseValue(@NonNull value: String)

Inherited functions
Inherited properties