NavType.Companion

object NavType.Companion


Summary

Public functions

open NavType<*>
fromArgType(type: String?, packageName: String?)

Parse an argType string into a NavType.

Public properties

NavType<BooleanArray?>

NavType for storing boolean arrays, corresponding with the "boolean[]" type in a Navigation XML file.

NavType<Boolean>

NavType for storing boolean values, corresponding with the "boolean" type in a Navigation XML file.

NavType<FloatArray?>

NavType for storing float arrays, corresponding with the "float[]" type in a Navigation XML file.

NavType<Float>

NavType for storing float values, corresponding with the "float" type in a Navigation XML file.

NavType<IntArray?>

NavType for storing integer arrays, corresponding with the "integer[]" type in a Navigation XML file.

NavType<Int>

NavType for storing integer values, corresponding with the "integer" type in a Navigation XML file.

NavType<LongArray?>

NavType for storing long arrays, corresponding with the "long[]" type in a Navigation XML file.

NavType<Long>

NavType for storing long values, corresponding with the "long" type in a Navigation XML file.

NavType<Int>

NavType for storing integer values representing resource ids, corresponding with the "reference" type in a Navigation XML file.

NavType<Array<String>?>

NavType for storing String arrays, corresponding with the "string[]" type in a Navigation XML file.

NavType<String?>

NavType for storing String values, corresponding with the "string" type in a Navigation XML file.

Public functions

fromArgType

open fun fromArgType(type: String?, packageName: String?): NavType<*>

Parse an argType string into a NavType.

Parameters
type: String?

argType string, usually parsed from the Navigation XML file

packageName: String?

package name of the R file, used for parsing relative class names starting with a dot.

Returns
NavType<*>

a NavType representing the type indicated by the argType string. Defaults to StringType for null.

Throws
kotlin.IllegalArgumentException

if there is no valid argType

kotlin.RuntimeException

if the type class name cannot be found

Public properties

BoolArrayType

val BoolArrayTypeNavType<BooleanArray?>

NavType for storing boolean arrays, corresponding with the "boolean[]" type in a Navigation XML file.

Null values are supported. Default values in Navigation XML files are not supported.

BoolType

val BoolTypeNavType<Boolean>

NavType for storing boolean values, corresponding with the "boolean" type in a Navigation XML file.

Null values are not supported.

FloatArrayType

val FloatArrayTypeNavType<FloatArray?>

NavType for storing float arrays, corresponding with the "float[]" type in a Navigation XML file.

Null values are supported. Default values in Navigation XML files are not supported.

FloatType

val FloatTypeNavType<Float>

NavType for storing float values, corresponding with the "float" type in a Navigation XML file.

Null values are not supported.

IntArrayType

val IntArrayTypeNavType<IntArray?>

NavType for storing integer arrays, corresponding with the "integer[]" type in a Navigation XML file.

Null values are supported. Default values in Navigation XML files are not supported.

IntType

val IntTypeNavType<Int>

NavType for storing integer values, corresponding with the "integer" type in a Navigation XML file.

Null values are not supported.

LongArrayType

val LongArrayTypeNavType<LongArray?>

NavType for storing long arrays, corresponding with the "long[]" type in a Navigation XML file.

Null values are supported. Default values in Navigation XML files are not supported.

LongType

val LongTypeNavType<Long>

NavType for storing long values, corresponding with the "long" type in a Navigation XML file.

Null values are not supported. Default values for this type in Navigation XML files must always end with an 'L' suffix, e.g. app:defaultValue="123L".

ReferenceType

val ReferenceTypeNavType<Int>

NavType for storing integer values representing resource ids, corresponding with the "reference" type in a Navigation XML file.

Null values are not supported.

StringArrayType

val StringArrayTypeNavType<Array<String>?>

NavType for storing String arrays, corresponding with the "string[]" type in a Navigation XML file.

Null values are supported. Default values in Navigation XML files are not supported.

StringType

val StringTypeNavType<String?>

NavType for storing String values, corresponding with the "string" type in a Navigation XML file.

Null values are supported.