Resources.GetColorStateList Resources.GetColorStateList Method

Definition

Overloads

GetColorStateList(Int32) GetColorStateList(Int32)

Returns a color state list associated with a particular resource ID.

GetColorStateList(Int32, Resources+Theme) GetColorStateList(Int32, Resources+Theme)

GetColorStateList(Int32) GetColorStateList(Int32)

Warning

This API is now obsolete.

Returns a color state list associated with a particular resource ID.

[Android.Runtime.Register("getColorStateList", "(I)Landroid/content/res/ColorStateList;", "GetGetColorStateList_IHandler")]
[System.Obsolete("deprecated")]
public virtual Android.Content.Res.ColorStateList GetColorStateList (int id);
abstract member GetColorStateList : int -> Android.Content.Res.ColorStateList
override this.GetColorStateList : int -> Android.Content.Res.ColorStateList

Parameters

id
Int32 Int32

The desired resource identifier of a ColorStateList, as generated by the aapt tool. This integer encodes the package, type, and resource entry. The value 0 is an invalid identifier.

Returns

Exceptions

Throws NotFoundException if the given ID does not exist.

Remarks

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.

GetColorStateList(Int32, Resources+Theme) GetColorStateList(Int32, Resources+Theme)

[Android.Runtime.Register("getColorStateList", "(ILandroid/content/res/Resources$Theme;)Landroid/content/res/ColorStateList;", "GetGetColorStateList_ILandroid_content_res_Resources_Theme_Handler", ApiSince=23)]
public virtual Android.Content.Res.ColorStateList GetColorStateList (int id, Android.Content.Res.Resources.Theme theme);
abstract member GetColorStateList : int * Android.Content.Res.Resources.Theme -> Android.Content.Res.ColorStateList
override this.GetColorStateList : int * Android.Content.Res.Resources.Theme -> Android.Content.Res.ColorStateList

Parameters

Returns

Remarks

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.

Applies to