Android.Graphics.Drawables.GradientDrawable.SetCornerRadius Method

Syntax

[Android.Runtime.Register("setCornerRadius", "(F)V", "GetSetCornerRadius_FHandler")]
public virtual void SetCornerRadius (float radius)

See Also

GradientDrawable.SetCornerRadii(Single[])
GradientDrawable.SetShape(ShapeType)

Parameters

radius
The radius in pixels of the corners of the rectangle shape

Remarks

Specify radius for the corners of the gradient. If this is > 0, then the drawable is drawn in a round-rectangle, rather than a rectangle. This property is honored only when the shape is of type GradientDrawable.RECTANGLE.

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