Share via


IMenuItem.SetIconTintList(ColorStateList) Method

Definition

Applies a tint to this item's icon.

[Android.Runtime.Register("setIconTintList", "(Landroid/content/res/ColorStateList;)Landroid/view/MenuItem;", "GetSetIconTintList_Landroid_content_res_ColorStateList_Handler:Android.Views.IMenuItem, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
public virtual Android.Views.IMenuItem SetIconTintList (Android.Content.Res.ColorStateList? tint);
[<Android.Runtime.Register("setIconTintList", "(Landroid/content/res/ColorStateList;)Landroid/view/MenuItem;", "GetSetIconTintList_Landroid_content_res_ColorStateList_Handler:Android.Views.IMenuItem, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member SetIconTintList : Android.Content.Res.ColorStateList -> Android.Views.IMenuItem
override this.SetIconTintList : Android.Content.Res.ColorStateList -> Android.Views.IMenuItem

Parameters

tint
ColorStateList

the tint to apply, may be null to clear tint

Returns

Attributes

Remarks

Applies a tint to this item's icon. Does not modify the current tint mode, which is PorterDuff.Mode#SRC_IN by default.

Subsequent calls to #setIcon(Drawable) or #setIcon(int) will automatically mutate the icon and apply the specified tint and tint mode using Drawable#setTintList(ColorStateList).

Java documentation for android.view.MenuItem.setIconTintList(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