Example usage for Java android.content.res TypedArray fields, constructors, methods, implement or subclass
The text is from its open source code.
boolean | getBoolean(@StyleableRes int index, boolean defValue) Retrieve the boolean value for the attribute at index. |
int | getChangingConfigurations() Return a mask of the configuration parameters for which the values in this typed array may change. |
int | getColor(@StyleableRes int index, @ColorInt int defValue) Retrieve the color value for the attribute at index. |
ColorStateList | getColorStateList(@StyleableRes int index) Retrieve the ColorStateList for the attribute at index. |
float | getDimension(@StyleableRes int index, float defValue) Retrieve a dimensional unit attribute at index. |
int | getDimensionPixelOffset(@StyleableRes int index, int defValue) Retrieve a dimensional unit attribute at index for use as an offset in raw pixels. |
int | getDimensionPixelSize(@StyleableRes int index, int defValue) Retrieve a dimensional unit attribute at index for use as a size in raw pixels. |
Drawable | getDrawable(@StyleableRes int index) Retrieve the Drawable for the attribute at index. |
float | getFloat(@StyleableRes int index, float defValue) Retrieve the float value for the attribute at index. |
float | getFraction(@StyleableRes int index, int base, int pbase, float defValue) Retrieves a fractional unit attribute at index. |
int | getIndex(int at) Returns an index in the array that has data. |
int | getIndexCount() Returns the number of indices in the array that actually have data. |
int | getInt(@StyleableRes int index, int defValue) Retrieve the integer value for the attribute at index. |
int | getInteger(@StyleableRes int index, int defValue) Retrieve the integer value for the attribute at index. |
int | getLayoutDimension(@StyleableRes int index, String name) Special version of #getDimensionPixelSize for retrieving android.view.ViewGroup 's layout_width and layout_height attributes. |
int | getLayoutDimension(@StyleableRes int index, int defValue) Special version of #getDimensionPixelSize for retrieving android.view.ViewGroup 's layout_width and layout_height attributes. |
String | getNonConfigurationString(@StyleableRes int index, @Config int allowedChangingConfigs) Retrieves the string value for the attribute at index that is not allowed to change with the given configurations. |
String | getNonResourceString(@StyleableRes int index) Retrieves the string value for the attribute at index, but only if that string comes from an immediate value in an XML file. |
String | getPositionDescription() Returns a message about the parser state suitable for printing error messages. |
int | getResourceId(@StyleableRes int index, int defValue) Retrieves the resource identifier for the attribute at index. |
Resources | getResources() Returns the Resources object this array was loaded from. |
String | getString(@StyleableRes int index) Retrieves the string value for the attribute at index. |
CharSequence | getText(@StyleableRes int index) Retrieves the styled string value for the attribute at index. |
CharSequence[] | getTextArray(@StyleableRes int index) Retrieve the CharSequence[] for the attribute at index. |
int | getType(@StyleableRes int index) Returns the type of attribute at the specified index. |
boolean | getValue(@StyleableRes int index, TypedValue outValue) Retrieve the raw TypedValue for the attribute at index. |
boolean | hasValue(@StyleableRes int index) Determines whether there is an attribute at index. |
boolean | hasValueOrEmpty(@StyleableRes int index) Determines whether there is an attribute at index, returning true if the attribute was explicitly set to @empty and false only if the attribute was undefined. |
int | length() Returns the number of values in this array. |
TypedValue | peekValue(@StyleableRes int index) Retrieve the raw TypedValue for the attribute at index and return a temporary object holding its data. |
void | recycle() Recycles the TypedArray, to be re-used by a later caller. |