/**@class android.util.TypedValue @extends java.lang.Object Container for a dynamically typed data value. Primarily used with {@link android.content.res.Resources} for holding resource values. */ var TypedValue = { /**The value contains no data. */ TYPE_NULL : "0", /**The <var>data</var> field holds a resource identifier. */ TYPE_REFERENCE : "1", /**The <var>data</var> field holds an attribute resource identifier (referencing an attribute in the current theme style, not a resource entry). */ TYPE_ATTRIBUTE : "2", /**The <var>string</var> field holds string data. In addition, if <var>data</var> is non-zero then it is the string block index of the string and <var>assetCookie</var> is the set of assets the string came from. */ TYPE_STRING : "3", /**The <var>data</var> field holds an IEEE 754 floating point number. */ TYPE_FLOAT : "4", /**The <var>data</var> field holds a complex number encoding a dimension value. */ TYPE_DIMENSION : "5", /**The <var>data</var> field holds a complex number encoding a fraction of a container. */ TYPE_FRACTION : "6", /**Identifies the start of plain integer values. Any type value from this to {@link #TYPE_LAST_INT} means the <var>data</var> field holds a generic integer value. */ TYPE_FIRST_INT : "16", /**The <var>data</var> field holds a number that was originally specified in decimal. */ TYPE_INT_DEC : "16", /**The <var>data</var> field holds a number that was originally specified in hexadecimal (0xn). */ TYPE_INT_HEX : "17", /**The <var>data</var> field holds 0 or 1 that was originally specified as "false" or "true". */ TYPE_INT_BOOLEAN : "18", /**Identifies the start of integer values that were specified as color constants (starting with '#'). */ TYPE_FIRST_COLOR_INT : "28", /**The <var>data</var> field holds a color that was originally specified as #aarrggbb. */ TYPE_INT_COLOR_ARGB8 : "28", /**The <var>data</var> field holds a color that was originally specified as #rrggbb. */ TYPE_INT_COLOR_RGB8 : "29", /**The <var>data</var> field holds a color that was originally specified as #argb. */ TYPE_INT_COLOR_ARGB4 : "30", /**The <var>data</var> field holds a color that was originally specified as #rgb. */ TYPE_INT_COLOR_RGB4 : "31", /**Identifies the end of integer values that were specified as color constants. */ TYPE_LAST_COLOR_INT : "31", /**Identifies the end of plain integer values. */ TYPE_LAST_INT : "31", /**Complex data: bit location of unit information. */ COMPLEX_UNIT_SHIFT : "0", /**Complex data: mask to extract unit information (after shifting by {@link #COMPLEX_UNIT_SHIFT}). This gives us 16 possible types, as defined below. */ COMPLEX_UNIT_MASK : "15", /**{@link #TYPE_DIMENSION} complex unit: Value is raw pixels. */ COMPLEX_UNIT_PX : "0", /**{@link #TYPE_DIMENSION} complex unit: Value is Device Independent Pixels. */ COMPLEX_UNIT_DIP : "1", /**{@link #TYPE_DIMENSION} complex unit: Value is a scaled pixel. */ COMPLEX_UNIT_SP : "2", /**{@link #TYPE_DIMENSION} complex unit: Value is in points. */ COMPLEX_UNIT_PT : "3", /**{@link #TYPE_DIMENSION} complex unit: Value is in inches. */ COMPLEX_UNIT_IN : "4", /**{@link #TYPE_DIMENSION} complex unit: Value is in millimeters. */ COMPLEX_UNIT_MM : "5", /**{@link #TYPE_FRACTION} complex unit: A basic fraction of the overall size. */ COMPLEX_UNIT_FRACTION : "0", /**{@link #TYPE_FRACTION} complex unit: A fraction of the parent size. */ COMPLEX_UNIT_FRACTION_PARENT : "1", /**Complex data: where the radix information is, telling where the decimal place appears in the mantissa. */ COMPLEX_RADIX_SHIFT : "4", /**Complex data: mask to extract radix information (after shifting by {@link #COMPLEX_RADIX_SHIFT}). This give us 4 possible fixed point representations as defined below. */ COMPLEX_RADIX_MASK : "3", /**Complex data: the mantissa is an integral number -- i.e., 0xnnnnnn.0 */ COMPLEX_RADIX_23p0 : "0", /**Complex data: the mantissa magnitude is 16 bits -- i.e, 0xnnnn.nn */ COMPLEX_RADIX_16p7 : "1", /**Complex data: the mantissa magnitude is 8 bits -- i.e, 0xnn.nnnn */ COMPLEX_RADIX_8p15 : "2", /**Complex data: the mantissa magnitude is 0 bits -- i.e, 0x0.nnnnnn */ COMPLEX_RADIX_0p23 : "3", /**Complex data: bit location of mantissa information. */ COMPLEX_MANTISSA_SHIFT : "8", /**Complex data: mask to extract mantissa information (after shifting by {@link #COMPLEX_MANTISSA_SHIFT}). This gives us 23 bits of precision; the top bit is the sign. */ COMPLEX_MANTISSA_MASK : "16777215", /** {@link #TYPE_NULL} data indicating the value was not specified. */ DATA_NULL_UNDEFINED : "0", /** {@link #TYPE_NULL} data indicating the value was explicitly set to null. */ DATA_NULL_EMPTY : "1", /** If {@link #density} is equal to this value, then the density should be treated as the system's default density value: {@link android.util.DisplayMetrics#DENSITY_DEFAULT}. */ DENSITY_DEFAULT : "0", /** If {@link #density} is equal to this value, then there is no density associated with the resource and it should not be scaled. */ DENSITY_NONE : "65535", /**The type held by this value, as defined by the constants here. This tells you how to interpret the other fields in the object. */ type : "null", /**If the value holds a string, this is it. */ string : "null", /**Basic data in the value, interpreted according to {@link #type} */ data : "null", /**Additional information about where the value came from; only set for strings. */ assetCookie : "null", /**If Value came from a resource, this holds the corresponding resource id. */ resourceId : "null", /** If the value came from a resource, these are the configurations for which its contents can change. <p>For example, if a resource has a value defined for the -land resource qualifier, this field will have the {@link android.content.pm.ActivityInfo#CONFIG_ORIENTATION} bit set. </p> @see android.content.pm.ActivityInfo#CONFIG_MCC @see android.content.pm.ActivityInfo#CONFIG_MNC @see android.content.pm.ActivityInfo#CONFIG_LOCALE @see android.content.pm.ActivityInfo#CONFIG_TOUCHSCREEN @see android.content.pm.ActivityInfo#CONFIG_KEYBOARD @see android.content.pm.ActivityInfo#CONFIG_KEYBOARD_HIDDEN @see android.content.pm.ActivityInfo#CONFIG_NAVIGATION @see android.content.pm.ActivityInfo#CONFIG_ORIENTATION @see android.content.pm.ActivityInfo#CONFIG_SCREEN_LAYOUT @see android.content.pm.ActivityInfo#CONFIG_UI_MODE @see android.content.pm.ActivityInfo#CONFIG_SCREEN_SIZE @see android.content.pm.ActivityInfo#CONFIG_SMALLEST_SCREEN_SIZE @see android.content.pm.ActivityInfo#CONFIG_DENSITY @see android.content.pm.ActivityInfo#CONFIG_LAYOUT_DIRECTION @see android.content.pm.ActivityInfo#CONFIG_COLOR_MODE */ changingConfigurations : "null", /** If the Value came from a resource, this holds the corresponding pixel density. */ density : "null", /** If the Value came from a style resource or a layout resource (set in an XML layout), this holds the corresponding style or layout resource id against which the attribute was resolved. */ sourceResourceId : "null", /**Return the data for this value as a float. Only use for values whose type is {@link #TYPE_FLOAT}. */ getFloat : function( ) {}, /**Determine if a value is a color. This works by comparing {@link #type} to {@link #TYPE_FIRST_COLOR_INT} and {@link #TYPE_LAST_COLOR_INT}. @return {Boolean} true if this value is a color */ isColorType : function( ) {}, /**Retrieve the base value from a complex data integer. This uses the {@link #COMPLEX_MANTISSA_MASK} and {@link #COMPLEX_RADIX_MASK} fields of the data to compute a floating point representation of the number they describe. The units are ignored. @param {Number} complex A complex data value. @return {Number} A floating point value corresponding to the complex data. */ complexToFloat : function( ) {}, /**Converts a complex data value holding a dimension to its final floating point value. The given <var>data</var> must be structured as a {@link #TYPE_DIMENSION}. @param {Number} data A complex data value holding a unit, magnitude, and mantissa. @param {Object {DisplayMetrics}} metrics Current display metrics to use in the conversion -- supplies display density and scaling information. @return {Number} The complex floating point value multiplied by the appropriate metrics depending on its unit. */ complexToDimension : function( ) {}, /**Converts a complex data value holding a dimension to its final value as an integer pixel offset. This is the same as {@link #complexToDimension}, except the raw floating point value is truncated to an integer (pixel) value. The given <var>data</var> must be structured as a {@link #TYPE_DIMENSION}. @param {Number} data A complex data value holding a unit, magnitude, and mantissa. @param {Object {DisplayMetrics}} metrics Current display metrics to use in the conversion -- supplies display density and scaling information. @return {Number} The number of pixels specified by the data and its desired multiplier and units. */ complexToDimensionPixelOffset : function( ) {}, /**Converts a complex data value holding a dimension to its final value as an integer pixel size. This is the same as {@link #complexToDimension}, except the raw floating point value is converted to an integer (pixel) value for use as a size. A size conversion involves rounding the base value, and ensuring that a non-zero base value is at least one pixel in size. The given <var>data</var> must be structured as a {@link #TYPE_DIMENSION}. @param {Number} data A complex data value holding a unit, magnitude, and mantissa. @param {Object {DisplayMetrics}} metrics Current display metrics to use in the conversion -- supplies display density and scaling information. @return {Number} The number of pixels specified by the data and its desired multiplier and units. */ complexToDimensionPixelSize : function( ) {}, /** @hide Was accidentally exposed in API level 1 for debugging purposes. Kept for compatibility just in case although the debugging code has been removed. */ complexToDimensionNoisy : function( ) {}, /**Return the complex unit type for this value. For example, a dimen type with value 12sp will return {@link #COMPLEX_UNIT_SP}. Only use for values whose type is {@link #TYPE_DIMENSION}. @return {Number} The complex unit type. */ getComplexUnit : function( ) {}, /**Converts an unpacked complex data value holding a dimension to its final floating point value. The two parameters <var>unit</var> and <var>value</var> are as in {@link #TYPE_DIMENSION}. @param {Number} unit The unit to convert from. @param {Number} value The value to apply the unit to. @param {Object {DisplayMetrics}} metrics Current display metrics to use in the conversion -- supplies display density and scaling information. @return {Number} The complex floating point value multiplied by the appropriate metrics depending on its unit. */ applyDimension : function( ) {}, /**Return the data for this value as a dimension. Only use for values whose type is {@link #TYPE_DIMENSION}. @param {Object {DisplayMetrics}} metrics Current display metrics to use in the conversion -- supplies display density and scaling information. @return {Number} The complex floating point value multiplied by the appropriate metrics depending on its unit. */ getDimension : function( ) {}, /**Converts a complex data value holding a fraction to its final floating point value. The given <var>data</var> must be structured as a {@link #TYPE_FRACTION}. @param {Number} data A complex data value holding a unit, magnitude, and mantissa. @param {Number} base The base value of this fraction. In other words, a standard fraction is multiplied by this value. @param {Number} pbase The parent base value of this fraction. In other words, a parent fraction (nn%p) is multiplied by this value. @return {Number} The complex floating point value multiplied by the appropriate base value depending on its unit. */ complexToFraction : function( ) {}, /**Return the data for this value as a fraction. Only use for values whose type is {@link #TYPE_FRACTION}. @param {Number} base The base value of this fraction. In other words, a standard fraction is multiplied by this value. @param {Number} pbase The parent base value of this fraction. In other words, a parent fraction (nn%p) is multiplied by this value. @return {Number} The complex floating point value multiplied by the appropriate base value depending on its unit. */ getFraction : function( ) {}, /**Regardless of the actual type of the value, try to convert it to a string value. For example, a color type will be converted to a string of the form #aarrggbb. @return {Object {java.lang.CharSequence}} CharSequence The coerced string value. If the value is null or the type is not known, null is returned. */ coerceToString : function( ) {}, /**Perform type conversion as per {@link #coerceToString}() on an explicitly supplied type and data. @param {Number} type The data type identifier. @param {Number} data The data value. @return {String} String The coerced string value. If the value is null or the type is not known, null is returned. */ coerceToString : function( ) {}, /** */ setTo : function( ) {}, /** */ toString : function( ) {}, };