Java android.content.res TypedArray fields, constructors, methods, implement or subclass

Example usage for Java android.content.res TypedArray fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.content.res TypedArray.

The text is from its open source code.

Method

booleangetBoolean(@StyleableRes int index, boolean defValue)
Retrieve the boolean value for the attribute at index.
intgetChangingConfigurations()
Return a mask of the configuration parameters for which the values in this typed array may change.
intgetColor(@StyleableRes int index, @ColorInt int defValue)
Retrieve the color value for the attribute at index.
ColorStateListgetColorStateList(@StyleableRes int index)
Retrieve the ColorStateList for the attribute at index.
floatgetDimension(@StyleableRes int index, float defValue)
Retrieve a dimensional unit attribute at index.
intgetDimensionPixelOffset(@StyleableRes int index, int defValue)
Retrieve a dimensional unit attribute at index for use as an offset in raw pixels.
intgetDimensionPixelSize(@StyleableRes int index, int defValue)
Retrieve a dimensional unit attribute at index for use as a size in raw pixels.
DrawablegetDrawable(@StyleableRes int index)
Retrieve the Drawable for the attribute at index.
floatgetFloat(@StyleableRes int index, float defValue)
Retrieve the float value for the attribute at index.
floatgetFraction(@StyleableRes int index, int base, int pbase, float defValue)
Retrieves a fractional unit attribute at index.
intgetIndex(int at)
Returns an index in the array that has data.
intgetIndexCount()
Returns the number of indices in the array that actually have data.
intgetInt(@StyleableRes int index, int defValue)
Retrieve the integer value for the attribute at index.
intgetInteger(@StyleableRes int index, int defValue)
Retrieve the integer value for the attribute at index.
intgetLayoutDimension(@StyleableRes int index, String name)
Special version of #getDimensionPixelSize for retrieving android.view.ViewGroup 's layout_width and layout_height attributes.
intgetLayoutDimension(@StyleableRes int index, int defValue)
Special version of #getDimensionPixelSize for retrieving android.view.ViewGroup 's layout_width and layout_height attributes.
StringgetNonConfigurationString(@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.
StringgetNonResourceString(@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.
StringgetPositionDescription()
Returns a message about the parser state suitable for printing error messages.
intgetResourceId(@StyleableRes int index, int defValue)
Retrieves the resource identifier for the attribute at index.
ResourcesgetResources()
Returns the Resources object this array was loaded from.
StringgetString(@StyleableRes int index)
Retrieves the string value for the attribute at index.
CharSequencegetText(@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.
intgetType(@StyleableRes int index)
Returns the type of attribute at the specified index.
booleangetValue(@StyleableRes int index, TypedValue outValue)
Retrieve the raw TypedValue for the attribute at index.
booleanhasValue(@StyleableRes int index)
Determines whether there is an attribute at index.
booleanhasValueOrEmpty(@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.
intlength()
Returns the number of values in this array.
TypedValuepeekValue(@StyleableRes int index)
Retrieve the raw TypedValue for the attribute at index and return a temporary object holding its data.
voidrecycle()
Recycles the TypedArray, to be re-used by a later caller.