TypedArray.GetColorStateList(Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieve the ColorStateList for the attribute at <var>index</var>.
[Android.Runtime.Register("getColorStateList", "(I)Landroid/content/res/ColorStateList;", "GetGetColorStateList_IHandler")]
public virtual Android.Content.Res.ColorStateList? GetColorStateList (int index);
[<Android.Runtime.Register("getColorStateList", "(I)Landroid/content/res/ColorStateList;", "GetGetColorStateList_IHandler")>]
abstract member GetColorStateList : int -> Android.Content.Res.ColorStateList
override this.GetColorStateList : int -> Android.Content.Res.ColorStateList
Parameters
- index
- Int32
Index of attribute to retrieve.
Returns
ColorStateList for the attribute, or null
if not
defined.
- Attributes
Exceptions
if the attribute if the TypedArray has already been recycled.
if the attribute is defined but is not an integer color or color state list.
Remarks
Retrieve the ColorStateList for the attribute at <var>index</var>. The value may be either a single solid color or a reference to a color or complex android.content.res.ColorStateList
description.
This method will return null
if the attribute is not defined or is not an integer color or color state list.
Java documentation for android.content.res.TypedArray.getColorStateList(int)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.