Lingua

RemoteViews.SetViewPadding Method

Definition

Overloads

Name Description
SetViewPadding(Int32, Int32, Int32, Int32, Int32)

Equivalent to calling android.view.View#setPadding(int, int, int, int).

SetViewPadding(Int32, Single, Single, Single, Single, Int32)

Equivalent to calling View.setPadding(int, int, int, int).

SetViewPadding(Int32, Int32, Int32, Int32, Int32)

Equivalent to calling android.view.View#setPadding(int, int, int, int).

[Android.Runtime.Register("setViewPadding", "(IIIII)V", "GetSetViewPadding_IIIIIHandler")]
public virtual void SetViewPadding(int viewId, int left, int top, int right, int bottom);
[<Android.Runtime.Register("setViewPadding", "(IIIII)V", "GetSetViewPadding_IIIIIHandler")>]
abstract member SetViewPadding : int * int * int * int * int -> unit
override this.SetViewPadding : int * int * int * int * int -> unit

Parameters

viewId
Int32

The id of the view to change

left
Int32

the left padding in pixels

top
Int32

the top padding in pixels

right
Int32

the right padding in pixels

bottom
Int32

the bottom padding in pixels

Attributes

Remarks

Java documentation for android.widget.RemoteViews.setViewPadding(int, 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

SetViewPadding(Int32, Single, Single, Single, Single, Int32)

Equivalent to calling View.setPadding(int, int, int, int).

[Android.Runtime.Register("setViewPadding", "(IFFFFI)V", "GetSetViewPadding_IFFFFIHandler", ApiSince=37)]
public virtual void SetViewPadding(int viewId, float left, float top, float right, float bottom, int units);
[<Android.Runtime.Register("setViewPadding", "(IFFFFI)V", "GetSetViewPadding_IFFFFIHandler", ApiSince=37)>]
abstract member SetViewPadding : int * single * single * single * single * int -> unit
override this.SetViewPadding : int * single * single * single * single * int -> unit

Parameters

viewId
Int32

The id of the view to change

left
Single

the left padding value in the given units

top
Single

the top padding value in the given units

right
Single

the right padding value in the given units

bottom
Single

the bottom padding value in the given units

units
Int32

The unit type of the value, e.g. TypedValue.COMPLEX_UNIT_DIP Value is one of the following: TypedValue.COMPLEX_UNIT_PX; TypedValue.COMPLEX_UNIT_DIP; TypedValue.COMPLEX_UNIT_SP; TypedValue.COMPLEX_UNIT_PT; TypedValue.COMPLEX_UNIT_IN; TypedValue.COMPLEX_UNIT_MM

Attributes

Remarks

Equivalent to calling View.setPadding(int, int, int, int). This overload supports using values with complex units that are resolved when this RemoteViews is displayed.

Prefer using scalable units like TypedValue.COMPLEX_UNIT_DIP. As of Android 17, the TypedValue.COMPLEX_UNIT_PX values set by this function will be automatically scaled when the RemoteViews is used on a display with a different density.

Android reference for android.widget.RemoteViews.setViewPadding.

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