Drawable.SetTintList(ColorStateList) Method

Definition

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

C#
[Android.Runtime.Register("setTintList", "(Landroid/content/res/ColorStateList;)V", "GetSetTintList_Landroid_content_res_ColorStateList_Handler")]
public virtual void SetTintList(Android.Content.Res.ColorStateList? tint);

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).

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

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

Produkt Wersje
.NET for Android .NET for Android API 34, .NET for Android API 35

See also

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