PopupWindow.SetWindowLayoutMode(Int32, Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
警告
deprecated
更改視窗管理器彈出視窗給你的寬度和高度度量規格。
[Android.Runtime.Register("setWindowLayoutMode", "(II)V", "GetSetWindowLayoutMode_IIHandler")]
[System.Obsolete("deprecated")]
public virtual void SetWindowLayoutMode(int widthSpec, int heightSpec);
[<Android.Runtime.Register("setWindowLayoutMode", "(II)V", "GetSetWindowLayoutMode_IIHandler")>]
[<System.Obsolete("deprecated")>]
abstract member SetWindowLayoutMode : int * int -> unit
override this.SetWindowLayoutMode : int * int -> unit
參數
- widthSpec
- Int32
一個明確的寬度測量規格模式,為 ViewGroup.LayoutParams#WRAP_CONTENT、 , ViewGroup.LayoutParams#MATCH_PARENT或為 0 以使用絕對寬度。
- heightSpec
- Int32
一個明確的高度度量規格模式,可以是 ViewGroup.LayoutParams#WRAP_CONTENT、 , ViewGroup.LayoutParams#MATCH_PARENT或是 0 來使用絕對高度。
- 屬性
備註
更改視窗管理器彈出視窗給你的寬度和高度度量規格。 預設情況下,這些尺寸是 0,表示視窗管理器會請求目前的寬度或高度作為明確大小。 你可以 ViewGroup.LayoutParams#WRAP_CONTENT 提供或 ViewGroup.LayoutParams#MATCH_PARENT 要求提供該測量規格,取代彈出視窗中設定的絕對寬度和高度。
如果彈出視窗顯示,呼叫此方法只會在下一次彈出視窗時生效。
此會員已被棄用。 使用 #setWidth(int) 和 #setHeight(int)。
Java 文件 android.widget.PopupWindow.setWindowLayoutMode(int, int)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。