android.util
Class TypedValue

java.lang.Object
  extended by android.util.TypedValue

public class TypedValue
extends Object


Field Summary
 int assetCookie
           
 int changingConfigurations
           
static int COMPLEX_MANTISSA_MASK
           
static int COMPLEX_MANTISSA_SHIFT
           
static int COMPLEX_RADIX_0p23
           
static int COMPLEX_RADIX_16p7
           
static int COMPLEX_RADIX_23p0
           
static int COMPLEX_RADIX_8p15
           
static int COMPLEX_RADIX_MASK
           
static int COMPLEX_RADIX_SHIFT
           
static int COMPLEX_UNIT_DIP
           
static int COMPLEX_UNIT_FRACTION
           
static int COMPLEX_UNIT_FRACTION_PARENT
           
static int COMPLEX_UNIT_IN
           
static int COMPLEX_UNIT_MASK
           
static int COMPLEX_UNIT_MM
           
static int COMPLEX_UNIT_PT
           
static int COMPLEX_UNIT_PX
           
static int COMPLEX_UNIT_SHIFT
           
static int COMPLEX_UNIT_SP
           
 int data
           
 int density
           
static int DENSITY_DEFAULT
           
static int DENSITY_NONE
           
 int resourceId
           
 CharSequence string
           
 int type
           
static int TYPE_ATTRIBUTE
           
static int TYPE_DIMENSION
           
static int TYPE_FIRST_COLOR_INT
           
static int TYPE_FIRST_INT
           
static int TYPE_FLOAT
           
static int TYPE_FRACTION
           
static int TYPE_INT_BOOLEAN
           
static int TYPE_INT_COLOR_ARGB4
           
static int TYPE_INT_COLOR_ARGB8
           
static int TYPE_INT_COLOR_RGB4
           
static int TYPE_INT_COLOR_RGB8
           
static int TYPE_INT_DEC
           
static int TYPE_INT_HEX
           
static int TYPE_LAST_COLOR_INT
           
static int TYPE_LAST_INT
           
static int TYPE_NULL
           
static int TYPE_REFERENCE
           
static int TYPE_STRING
           
 
Constructor Summary
TypedValue()
           
 
Method Summary
static float applyDimension(int unit, float value, DisplayMetrics metrics)
           
 CharSequence coerceToString()
           
static String coerceToString(int type, int data)
           
static float complexToDimension(int data, DisplayMetrics metrics)
           
static float complexToDimensionNoisy(int data, DisplayMetrics metrics)
           
static int complexToDimensionPixelOffset(int data, DisplayMetrics metrics)
           
static int complexToDimensionPixelSize(int data, DisplayMetrics metrics)
           
static float complexToFloat(int complex)
           
static float complexToFraction(int data, float base, float pbase)
           
 float getDimension(DisplayMetrics metrics)
           
 float getFloat()
           
 float getFraction(float base, float pbase)
           
 void setTo(TypedValue other)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE_NULL

public static final int TYPE_NULL
See Also:
Constant Field Values

TYPE_REFERENCE

public static final int TYPE_REFERENCE
See Also:
Constant Field Values

TYPE_ATTRIBUTE

public static final int TYPE_ATTRIBUTE
See Also:
Constant Field Values

TYPE_STRING

public static final int TYPE_STRING
See Also:
Constant Field Values

TYPE_FLOAT

public static final int TYPE_FLOAT
See Also:
Constant Field Values

TYPE_DIMENSION

public static final int TYPE_DIMENSION
See Also:
Constant Field Values

TYPE_FRACTION

public static final int TYPE_FRACTION
See Also:
Constant Field Values

TYPE_FIRST_INT

public static final int TYPE_FIRST_INT
See Also:
Constant Field Values

TYPE_INT_DEC

public static final int TYPE_INT_DEC
See Also:
Constant Field Values

TYPE_INT_HEX

public static final int TYPE_INT_HEX
See Also:
Constant Field Values

TYPE_INT_BOOLEAN

public static final int TYPE_INT_BOOLEAN
See Also:
Constant Field Values

TYPE_FIRST_COLOR_INT

public static final int TYPE_FIRST_COLOR_INT
See Also:
Constant Field Values

TYPE_INT_COLOR_ARGB8

public static final int TYPE_INT_COLOR_ARGB8
See Also:
Constant Field Values

TYPE_INT_COLOR_RGB8

public static final int TYPE_INT_COLOR_RGB8
See Also:
Constant Field Values

TYPE_INT_COLOR_ARGB4

public static final int TYPE_INT_COLOR_ARGB4
See Also:
Constant Field Values

TYPE_INT_COLOR_RGB4

public static final int TYPE_INT_COLOR_RGB4
See Also:
Constant Field Values

TYPE_LAST_COLOR_INT

public static final int TYPE_LAST_COLOR_INT
See Also:
Constant Field Values

TYPE_LAST_INT

public static final int TYPE_LAST_INT
See Also:
Constant Field Values

COMPLEX_UNIT_SHIFT

public static final int COMPLEX_UNIT_SHIFT
See Also:
Constant Field Values

COMPLEX_UNIT_MASK

public static final int COMPLEX_UNIT_MASK
See Also:
Constant Field Values

COMPLEX_UNIT_PX

public static final int COMPLEX_UNIT_PX
See Also:
Constant Field Values

COMPLEX_UNIT_DIP

public static final int COMPLEX_UNIT_DIP
See Also:
Constant Field Values

COMPLEX_UNIT_SP

public static final int COMPLEX_UNIT_SP
See Also:
Constant Field Values

COMPLEX_UNIT_PT

public static final int COMPLEX_UNIT_PT
See Also:
Constant Field Values

COMPLEX_UNIT_IN

public static final int COMPLEX_UNIT_IN
See Also:
Constant Field Values

COMPLEX_UNIT_MM

public static final int COMPLEX_UNIT_MM
See Also:
Constant Field Values

COMPLEX_UNIT_FRACTION

public static final int COMPLEX_UNIT_FRACTION
See Also:
Constant Field Values

COMPLEX_UNIT_FRACTION_PARENT

public static final int COMPLEX_UNIT_FRACTION_PARENT
See Also:
Constant Field Values

COMPLEX_RADIX_SHIFT

public static final int COMPLEX_RADIX_SHIFT
See Also:
Constant Field Values

COMPLEX_RADIX_MASK

public static final int COMPLEX_RADIX_MASK
See Also:
Constant Field Values

COMPLEX_RADIX_23p0

public static final int COMPLEX_RADIX_23p0
See Also:
Constant Field Values

COMPLEX_RADIX_16p7

public static final int COMPLEX_RADIX_16p7
See Also:
Constant Field Values

COMPLEX_RADIX_8p15

public static final int COMPLEX_RADIX_8p15
See Also:
Constant Field Values

COMPLEX_RADIX_0p23

public static final int COMPLEX_RADIX_0p23
See Also:
Constant Field Values

COMPLEX_MANTISSA_SHIFT

public static final int COMPLEX_MANTISSA_SHIFT
See Also:
Constant Field Values

COMPLEX_MANTISSA_MASK

public static final int COMPLEX_MANTISSA_MASK
See Also:
Constant Field Values

DENSITY_DEFAULT

public static final int DENSITY_DEFAULT
See Also:
Constant Field Values

DENSITY_NONE

public static final int DENSITY_NONE
See Also:
Constant Field Values

type

public int type

string

public CharSequence string

data

public int data

assetCookie

public int assetCookie

resourceId

public int resourceId

changingConfigurations

public int changingConfigurations

density

public int density
Constructor Detail

TypedValue

public TypedValue()
Method Detail

getFloat

public final float getFloat()

complexToFloat

public static float complexToFloat(int complex)

complexToDimension

public static float complexToDimension(int data,
                                       DisplayMetrics metrics)

complexToDimensionPixelOffset

public static int complexToDimensionPixelOffset(int data,
                                                DisplayMetrics metrics)

complexToDimensionPixelSize

public static int complexToDimensionPixelSize(int data,
                                              DisplayMetrics metrics)

complexToDimensionNoisy

public static float complexToDimensionNoisy(int data,
                                            DisplayMetrics metrics)

applyDimension

public static float applyDimension(int unit,
                                   float value,
                                   DisplayMetrics metrics)

getDimension

public float getDimension(DisplayMetrics metrics)

complexToFraction

public static float complexToFraction(int data,
                                      float base,
                                      float pbase)

getFraction

public float getFraction(float base,
                         float pbase)

coerceToString

public final CharSequence coerceToString()

coerceToString

public static final String coerceToString(int type,
                                          int data)

setTo

public void setTo(TypedValue other)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2008-2012. All Rights Reserved.