Sdílet prostřednictvím


LayerDrawable.SetPadding(Int32, Int32, Int32, Int32) Method

Definition

Sets the absolute padding.

[Android.Runtime.Register("setPadding", "(IIII)V", "GetSetPadding_IIIIHandler", ApiSince=23)]
public virtual void SetPadding (int left, int top, int right, int bottom);
[<Android.Runtime.Register("setPadding", "(IIII)V", "GetSetPadding_IIIIHandler", ApiSince=23)>]
abstract member SetPadding : int * int * int * int -> unit
override this.SetPadding : int * int * int * int -> unit

Parameters

left
Int32

the left padding in pixels, or -1 to use computed padding

top
Int32

the top padding in pixels, or -1 to use computed padding

right
Int32

the right padding in pixels, or -1 to use computed padding

bottom
Int32

the bottom padding in pixels, or -1 to use computed padding

Attributes

Remarks

Sets the absolute padding.

If padding in a dimension is specified as -1, the resolved padding will use the value computed according to the padding mode (see #setPaddingMode(int)).

Calling this method clears any relative padding values previously set using #setPaddingRelative(int, int, int, int).

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