RemoteViews.SetViewLayoutWidth(Int32, Single, Int32) 方法

定义

等效于设置 android.view.ViewGroup.LayoutParams#width ,只不过你可以在任何维度单位中提供该值。

[Android.Runtime.Register("setViewLayoutWidth", "(IFI)V", "GetSetViewLayoutWidth_IFIHandler", ApiSince=31)]
public virtual void SetViewLayoutWidth (int viewId, float width, int units);
[<Android.Runtime.Register("setViewLayoutWidth", "(IFI)V", "GetSetViewLayoutWidth_IFIHandler", ApiSince=31)>]
abstract member SetViewLayoutWidth : int * single * int -> unit
override this.SetViewLayoutWidth : int * single * int -> unit

参数

viewId
Int32
width
Single

给定单位中视图的宽度

units
Int32

值的单位类型,例如 TypedValue#COMPLEX_UNIT_DIP

属性

注解

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

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

适用于