Megosztás a következőn keresztül:


LayerDrawable.SetLayerSize(Int32, Int32, Int32) Method

Definition

Sets an explicit size for the specified layer.

[Android.Runtime.Register("setLayerSize", "(III)V", "GetSetLayerSize_IIIHandler", ApiSince=23)]
public virtual void SetLayerSize (int index, int w, int h);
[<Android.Runtime.Register("setLayerSize", "(III)V", "GetSetLayerSize_IIIHandler", ApiSince=23)>]
abstract member SetLayerSize : int * int * int -> unit
override this.SetLayerSize : int * int * int -> unit

Parameters

index
Int32

the index of the layer to adjust

w
Int32

width in pixels, or -1 to use the intrinsic width

h
Int32

height in pixels, or -1 to use the intrinsic height

Attributes

Remarks

Sets an explicit size for the specified layer.

<strong>Note:</strong> Setting an explicit layer size changes the default layer gravity behavior. See #setLayerGravity(int, int) for more information.

Java documentation for android.graphics.drawable.LayerDrawable.setLayerSize(int, 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