Aracılığıyla paylaş


GradientDrawable.SetSize(Int32, Int32) Method

Definition

Sets the size of the shape drawn by this drawable.

[Android.Runtime.Register("setSize", "(II)V", "GetSetSize_IIHandler")]
public virtual void SetSize (int width, int height);
[<Android.Runtime.Register("setSize", "(II)V", "GetSetSize_IIHandler")>]
abstract member SetSize : int * int -> unit
override this.SetSize : int * int -> unit

Parameters

width
Int32

The width of the shape used by this drawable

height
Int32

The height of the shape used by this drawable

Attributes

Remarks

Sets the size of the shape drawn 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.setSize(int, 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

See also