ColorStateListDrawable.ColorStateList Property

Definition

Returns the ColorStateList backing this Drawable, or a new ColorStateList of the default ColorDrawable color if one hasn't been defined yet. -or- Replace this Drawable's ColorStateList.

public virtual Android.Content.Res.ColorStateList ColorStateList { [Android.Runtime.Register("getColorStateList", "()Landroid/content/res/ColorStateList;", "GetGetColorStateListHandler", ApiSince=29)] get; [Android.Runtime.Register("setColorStateList", "(Landroid/content/res/ColorStateList;)V", "GetSetColorStateList_Landroid_content_res_ColorStateList_Handler", ApiSince=29)] set; }
[<get: Android.Runtime.Register("getColorStateList", "()Landroid/content/res/ColorStateList;", "GetGetColorStateListHandler", ApiSince=29)>]
[<set: Android.Runtime.Register("setColorStateList", "(Landroid/content/res/ColorStateList;)V", "GetSetColorStateList_Landroid_content_res_ColorStateList_Handler", ApiSince=29)>]
member this.ColorStateList : Android.Content.Res.ColorStateList with get, set

Property Value

a ColorStateList

Attributes

Remarks

Property getter documentation:

Returns the ColorStateList backing this Drawable, or a new ColorStateList of the default ColorDrawable color if one hasn't been defined yet.

Java documentation for android.graphics.drawable.ColorStateListDrawable.getColorStateList().

Property setter documentation:

Replace this Drawable's ColorStateList. It is not copied, so changes will propagate on the next call to #setState(int[]).

Java documentation for android.graphics.drawable.ColorStateListDrawable.setColorStateList(android.content.res.ColorStateList).

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