Java android.util TypedValue fields, constructors, methods, implement or subclass

Example usage for Java android.util TypedValue fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.util TypedValue.

The text is from its open source code.

Field

intTYPE_NULL
The value contains no data.
intTYPE_REFERENCE
The data field holds a resource identifier.
intTYPE_STRING
The string field holds string data.
intTYPE_FLOAT
The data field holds an IEEE 754 floating point number.
intTYPE_DIMENSION
The data field holds a complex number encoding a dimension value.
intTYPE_FRACTION
The data field holds a complex number encoding a fraction of a container.
intTYPE_FIRST_INT
Identifies the start of plain integer values.
intTYPE_INT_BOOLEAN
The data field holds 0 or 1 that was originally specified as "false" or "true".
intTYPE_FIRST_COLOR_INT
Identifies the start of integer values that were specified as color constants (starting with '#').
intTYPE_INT_COLOR_ARGB8
The data field holds a color that was originally specified as #aarrggbb.
intTYPE_LAST_COLOR_INT
Identifies the end of integer values that were specified as color constants.
intTYPE_LAST_INT
Identifies the end of plain integer values.
intCOMPLEX_UNIT_SHIFT
Complex data: bit location of unit information.
intCOMPLEX_UNIT_MASK
Complex data: mask to extract unit information (after shifting by #COMPLEX_UNIT_SHIFT ).
intCOMPLEX_UNIT_PX
#TYPE_DIMENSION complex unit: Value is raw pixels.
intCOMPLEX_UNIT_DIP
#TYPE_DIMENSION complex unit: Value is Device Independent Pixels.
intCOMPLEX_UNIT_SP
#TYPE_DIMENSION complex unit: Value is a scaled pixel.
intCOMPLEX_UNIT_PT
#TYPE_DIMENSION complex unit: Value is in points.
intCOMPLEX_UNIT_IN
#TYPE_DIMENSION complex unit: Value is in inches.
intCOMPLEX_UNIT_MM
#TYPE_DIMENSION complex unit: Value is in millimeters.

Constructor

Method

floatapplyDimension(int unit, float value, DisplayMetrics metrics)
Converts an unpacked complex data value holding a dimension to its final floating point value.
CharSequencecoerceToString()
Regardless of the actual type of the value, try to convert it to a string value.
floatcomplexToDimension(int data, DisplayMetrics metrics)
Converts a complex data value holding a dimension to its final floating point value.
intcomplexToDimensionPixelOffset(int data, DisplayMetrics metrics)
Converts a complex data value holding a dimension to its final value as an integer pixel offset.
intcomplexToDimensionPixelSize(int data, DisplayMetrics metrics)
Converts a complex data value holding a dimension to its final value as an integer pixel size.
floatcomplexToFloat(int complex)
Retrieve the base value from a complex data integer.
floatgetDimension(DisplayMetrics metrics)
Return the data for this value as a dimension.
floatgetFloat()
Return the data for this value as a float.
floatgetFraction(float base, float pbase)
Return the data for this value as a fraction.