Android.Graphics.Drawables.GradientDrawable.SetGradientCenter Method

Syntax

[Android.Runtime.Register("setGradientCenter", "(FF)V", "GetSetGradientCenter_FFHandler")]
public virtual void SetGradientCenter (float x, float y)

See Also

GradientDrawable.SetGradientType(GradientType)

Parameters

x
The x coordinate of the gradient's center
y
The y coordinate of the gradient's center

Remarks

Sets the center location of the gradient. The radius is honored only when the gradient type is set to GradientDrawable.RADIAL_GRADIENT or GradientDrawable.SWEEP_GRADIENT.

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

[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