다음을 통해 공유


Drawable.SetTintList(ColorStateList) Method

Definition

Specifies tint color for this drawable as a color state list.

[Android.Runtime.Register("setTintList", "(Landroid/content/res/ColorStateList;)V", "GetSetTintList_Landroid_content_res_ColorStateList_Handler")]
public virtual void SetTintList (Android.Content.Res.ColorStateList? tint);
[<Android.Runtime.Register("setTintList", "(Landroid/content/res/ColorStateList;)V", "GetSetTintList_Landroid_content_res_ColorStateList_Handler")>]
abstract member SetTintList : Android.Content.Res.ColorStateList -> unit
override this.SetTintList : Android.Content.Res.ColorStateList -> unit

Parameters

tint
ColorStateList

Color state list to use for tinting this drawable, or null to clear the tint

Attributes

Remarks

Specifies tint color for this drawable as a color state list.

A Drawable's drawing content will be blended together with its tint before it is drawn to the screen. This functions similarly to #setColorFilter(int, PorterDuff.Mode).

<p class="note"><strong>Note:</strong> Setting a color filter via #setColorFilter(ColorFilter) or #setColorFilter(int, PorterDuff.Mode) overrides tint. </p>

Java documentation for android.graphics.drawable.Drawable.setTintList(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

See also

  • SetTint(Int32)
  • <xref:Android.Graphics.Drawables.Drawable.SetTintMode(.Mode)>