Package org.robolectric.res.android
Enum DataType
- All Implemented Interfaces:
Serializable
,Comparable<DataType>
,java.lang.constant.Constable
Resource type codes.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptiondata
holds an attribute resource identifier.data
holds a complex number encoding a dimension value, such as "100in".data
holds an attribute resource identifier, which needs to be resolved before it can be used like a TYPE_ATTRIBUTE.data
holds a dynamicResourceTableChunk
entry reference.data
holds a single-precision floating point number.data
holds a complex number encoding a fraction of a container.data
is either 0 (false) or 1 (true).data
is a raw integer value of the form #argb.data
is a raw integer value of the form #aarrggbb.data
is a raw integer value of the form #rgb.data
is a raw integer value of the form #rrggbb.data
is a raw integer value of the form n..n.data
is a raw integer value of the form 0xn..n.data
is either 0 (undefined) or 1 (empty).data
holds aResourceTableChunk
entry reference.data
holds an index into the containing resource table's string pool. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyte
code()
static DataType
fromCode
(byte code) static DataType
fromCode
(int code) static DataType
Returns the enum constant of this type with the specified name.static DataType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
NULL
data
is either 0 (undefined) or 1 (empty). -
REFERENCE
data
holds aResourceTableChunk
entry reference. -
ATTRIBUTE
data
holds an attribute resource identifier. -
STRING
data
holds an index into the containing resource table's string pool. -
FLOAT
data
holds a single-precision floating point number. -
DIMENSION
data
holds a complex number encoding a dimension value, such as "100in". -
FRACTION
data
holds a complex number encoding a fraction of a container. -
DYNAMIC_REFERENCE
data
holds a dynamicResourceTableChunk
entry reference. -
DYNAMIC_ATTRIBUTE
data
holds an attribute resource identifier, which needs to be resolved before it can be used like a TYPE_ATTRIBUTE. -
INT_DEC
data
is a raw integer value of the form n..n. -
INT_HEX
data
is a raw integer value of the form 0xn..n. -
INT_BOOLEAN
data
is either 0 (false) or 1 (true). -
INT_COLOR_ARGB8
data
is a raw integer value of the form #aarrggbb. -
INT_COLOR_RGB8
data
is a raw integer value of the form #rrggbb. -
INT_COLOR_ARGB4
data
is a raw integer value of the form #argb. -
INT_COLOR_RGB4
data
is a raw integer value of the form #rgb.
-
-
Field Details
-
TYPE_FIRST_INT
public static final int TYPE_FIRST_INT -
TYPE_LAST_INT
public static final int TYPE_LAST_INT
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
code
public byte code() -
fromCode
-
fromCode
-