InspectableProperty.ValueType

Added in 1.1.0
Deprecated in 1.3.0

The type of value packed into a primitive {int}.

Summary

Enum Values

COLOR

Value packs color information.

GRAVITY

Value packs gravity information.

INFERRED

The default the annotation processor infers the value type from context.

INT_ENUM

Value packs an enumeration.

INT_FLAG

Value packs flags, of which many may be enabled at once.

NONE

No special handling, property is considered to be a numeric value.

RESOURCE_ID

Value is a resource ID

Public functions

InspectableProperty.ValueType
valueOf(value: String)

Returns the enum constant of this type with the specified name.

android
Array<InspectableProperty.ValueType>

Returns an array containing the constants of this enum type, in the order they're declared.

android

Enum Values

COLOR

val InspectableProperty.ValueType.COLORInspectableProperty.ValueType

Value packs color information.

This is inferred from ColorInt, or ColorLong on the getter method.

GRAVITY

val InspectableProperty.ValueType.GRAVITYInspectableProperty.ValueType

Value packs gravity information.

This type is not inferred and is non-trivial to represent using FlagEntry.

INFERRED

val InspectableProperty.ValueType.INFERREDInspectableProperty.ValueType

The default the annotation processor infers the value type from context.

INT_ENUM

val InspectableProperty.ValueType.INT_ENUMInspectableProperty.ValueType

Value packs an enumeration.

This is inferred if enumMapping is specified.

INT_FLAG

val InspectableProperty.ValueType.INT_FLAGInspectableProperty.ValueType

Value packs flags, of which many may be enabled at once.

This is inferred if flagMapping is specified.

NONE

val InspectableProperty.ValueType.NONEInspectableProperty.ValueType

No special handling, property is considered to be a numeric value.

RESOURCE_ID

val InspectableProperty.ValueType.RESOURCE_IDInspectableProperty.ValueType

Value is a resource ID

This type is inferred from the presence of a resource ID annotation such as AnyRes.

Public functions

valueOf

fun valueOf(value: String): InspectableProperty.ValueType

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Throws
kotlin.IllegalArgumentException

if this enum type has no constant with the specified name

values

fun values(): Array<InspectableProperty.ValueType>

Returns an array containing the constants of this enum type, in the order they're declared.

This method may be used to iterate over the constants.