Android Guides | Samples

Android.Graphics.Drawables.Drawable.SetTint Method

Specifies tint color for this drawable.

Syntax

[Android.Runtime.Register("setTint", "(I)V", "GetSetTint_IHandler")]
public virtual Void SetTint (Int32 tint)

See Also

Parameters

tint
Color to use for tinting this drawable

Remarks

Specifies tint color for this drawable.

A Drawable's drawing content will be blended together with its tint before it is drawn to the screen. This functions similarly to Drawable.SetColorFilter(Android.Graphics.Color, .Mode).

To clear the tint, pass null to Drawable.SetTintList(ColorStateList).

Note: Setting a color filter via Drawable.SetColorFilter(ColorFilter) or Drawable.SetColorFilter(Android.Graphics.Color, .Mode) overrides tint.

[Android Documentation]

Requirements

Namespace: Android.Graphics.Drawables
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1