Share via


GradientDrawable.SetShape(ShapeType) Method

Definition

Sets the type of shape used to draw the gradient.

[Android.Runtime.Register("setShape", "(I)V", "GetSetShape_IHandler")]
public virtual void SetShape (Android.Graphics.Drawables.ShapeType shape);
[<Android.Runtime.Register("setShape", "(I)V", "GetSetShape_IHandler")>]
abstract member SetShape : Android.Graphics.Drawables.ShapeType -> unit
override this.SetShape : Android.Graphics.Drawables.ShapeType -> unit

Parameters

shape
ShapeType

The desired shape for this drawable: #LINE, #OVAL, #RECTANGLE or #RING

Attributes

Remarks

Sets the type of shape used to draw the gradient.

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

Java documentation for android.graphics.drawable.GradientDrawable.setShape(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to