RemoteViews.SetViewLayoutMarginAttr(Int32, Int32, Int32) 方法

定义

等效于调用 MarginLayoutParams#setMarginEnd

[Android.Runtime.Register("setViewLayoutMarginAttr", "(III)V", "GetSetViewLayoutMarginAttr_IIIHandler", ApiSince=31)]
public virtual void SetViewLayoutMarginAttr (int viewId, int type, int attr);
[<Android.Runtime.Register("setViewLayoutMarginAttr", "(III)V", "GetSetViewLayoutMarginAttr_IIIHandler", ApiSince=31)>]
abstract member SetViewLayoutMarginAttr : int * int * int -> unit
override this.SetViewLayoutMarginAttr : int * int * int -> unit

参数

viewId
Int32

要更改的视图的 ID

type
Int32

要设置的边距,例如 #MARGIN_END

attr
Int32

要应用于边距的维度属性,或 0 以清除边距。

属性

注解

适用于 . 的 android.widget.RemoteViews.setViewLayoutMarginAttr(int, int, int)Java 文档

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于