語言

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

int

width
Single

視圖在給定單位中的寬度

units
Int32

該值的單位類型,例如 TypedValue#COMPLEX_UNIT_DIP

屬性

備註

Java 文件 android.widget.RemoteViews.setViewLayoutWidth(int, float, int)

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於