Android Guides | Samples

Android.Graphics.Drawables.Drawable.Mutate Method

Make this drawable mutable.

Syntax

[Android.Runtime.Register("mutate", "()Landroid/graphics/drawable/Drawable;", "GetMutateHandler")]
public virtual Drawable Mutate ()

See Also

Remarks

Make this drawable mutable. This operation cannot be reversed. A mutable drawable is guaranteed to not share its state with any other drawable. This is especially useful when you need to modify properties of drawables loaded from resources. By default, all drawables instances loaded from the same resource share a common state; if you modify the state of one instance, all the other instances will receive the same modification. Calling this method on a mutable Drawable will have no effect.

[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 3