Android Guides | Samples

Android.Content.Res.TypedArray Class

See Also: TypedArray

Syntax

[Android.Runtime.Register("android/content/res/TypedArray", DoNotGenerateAcw=true)]
public class TypedArray : Object

Remarks

Container for an array of values that were retrieved with NoType:android/content/res/Resources$Theme;Href=../../../../reference/android/content/res/Resources.Theme.html#obtainStyledAttributes(android.util.AttributeSet, int[], int, int) or Resources.ObtainAttributes(IAttributeSet,Int32[]). Be sure to call TypedArray.Recycle when done with them. The indices used to retrieve values from this structure correspond to the positions of the attributes given to obtainStyledAttributes.

[Android Documentation]

Requirements

Namespace: Android.Content.Res
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Android.Content.Res.TypedArray are listed below.

See Also: Object

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Properties

[read-only]
ChangingConfigurationsInt32. Return a mask of the configuration parameters for which the values in this typed array may change.
[read-only]
IndexCountInt32. Return the number of indices in the array that actually have data.
[read-only]
PositionDescriptionString. Returns a message about the parser state suitable for printing error messages.
[read-only]
ResourcesResources. Returns the Resources object this array was loaded from.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

GetBoolean(Int32, Boolean) : Boolean
Retrieve the boolean value for the attribute at index.
GetColor(Int32, Int32) : Color
Retrieve the color value for the attribute at index.
GetColorStateList(Int32) : ColorStateList
Retrieve the ColorStateList for the attribute at index.
GetDimension(Int32, Single) : Single
Retrieve a dimensional unit attribute at index.
GetDimensionPixelOffset(Int32, Int32) : Int32
Retrieve a dimensional unit attribute at index for use as an offset in raw pixels.
GetDimensionPixelSize(Int32, Int32) : Int32
Retrieve a dimensional unit attribute at index for use as a size in raw pixels.
GetDrawable(Int32) : Drawable
Retrieve the Drawable for the attribute at index.
GetFloat(Int32, Single) : Single
Retrieve the float value for the attribute at index.
GetFraction(Int32, Int32, Int32, Single) : Single
Retrieves a fractional unit attribute at index.
GetIndex(Int32) : Int32
Returns an index in the array that has data.
GetInt(Int32, Int32) : Int32
Retrieve the integer value for the attribute at index.
GetInteger(Int32, Int32) : Int32
Retrieve the integer value for the attribute at index.
GetLayoutDimension(Int32, Int32) : Int32
Special version of TypedArray.GetDimensionPixelSize(Int32,Int32) for retrieving ViewGroup's layout_width and layout_height attributes.
GetLayoutDimension(Int32, String) : Int32
Special version of TypedArray.GetDimensionPixelSize(Int32,Int32) for retrieving ViewGroup's layout_width and layout_height attributes.
GetNonResourceString(Int32) : String
Retrieves the string value for the attribute at index, but only if that string comes from an immediate value in an XML file.
GetResourceId(Int32, Int32) : Int32
Retrieves the resource identifier for the attribute at index.
GetString(Int32) : String
Retrieves the string value for the attribute at index.
GetText(Int32) : String
GetTextArray(Int32) : String[]
GetTextArrayFormatted(Int32) : ICharSequence[]
Retrieve the CharSequence[] for the attribute at index.
GetTextFormatted(Int32) : ICharSequence
Retrieves the styled string value for the attribute at index.
GetType(Int32) : Int32
Returns the type of attribute at the specified index.
GetValue(Int32, TypedValue) : Boolean
Retrieve the raw TypedValue for the attribute at index.
HasValue(Int32) : Boolean
Determines whether there is an attribute at index.
Length() : Int32
Returns the number of values in this array.
PeekValue(Int32) : TypedValue
Retrieve the raw TypedValue for the attribute at index and return a temporary object holding its data.
Recycle()
Recycles the TypedArray, to be re-used by a later caller.