Udostępnij za pośrednictwem


GradientDrawable.SetGradientType(GradientType) Method

Definition

Sets the type of gradient used by this drawable.

[Android.Runtime.Register("setGradientType", "(I)V", "GetSetGradientType_IHandler")]
public virtual void SetGradientType (Android.Graphics.Drawables.GradientType gradient);
[<Android.Runtime.Register("setGradientType", "(I)V", "GetSetGradientType_IHandler")>]
abstract member SetGradientType : Android.Graphics.Drawables.GradientType -> unit
override this.SetGradientType : Android.Graphics.Drawables.GradientType -> unit

Parameters

gradient
GradientType

The type of the gradient: #LINEAR_GRADIENT, #RADIAL_GRADIENT or #SWEEP_GRADIENT

Attributes

Remarks

Sets the type of gradient used by this drawable.

<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.setGradientType(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