Android.Graphics.Drawables.GradientDrawable.SetColors Method

Syntax

[Android.Runtime.Register("setColors", "([I)V", "GetSetColors_arrayIHandler")]
public virtual void SetColors (int[] colors)

See Also

GradientDrawable.SetColor(int)

Parameters

colors
2 or more ARGB colors

Remarks

Sets the colors used to draw the gradient. Each color is specified as an ARGB integer and the array must contain at least 2 colors.

Note: changing orientation will affect all instances of a drawable loaded from a resource. It is recommended to invoke GradientDrawable.mutate() before changing the orientation.

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