PopupWindow 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| PopupWindow() |
建立一個新的空白、無法聚焦的彈出視窗,尺寸為 (0,0)。 |
| PopupWindow(Context) |
建立一個新的空白、無法聚焦的彈出視窗,尺寸為 (0,0)。 |
| PopupWindow(View) |
建立一個新的非聚焦彈出視窗,可以顯示 |
| PopupWindow(Context, IAttributeSet) |
建立一個新的空白、無法聚焦的彈出視窗,尺寸為 (0,0)。 |
| PopupWindow(Int32, Int32) |
建立一個新的空白、無法聚焦的彈出視窗。 |
| PopupWindow(IntPtr, JniHandleOwnership) |
用於建立 JNI 物件受管理表示的建構器;由執行時呼叫。 |
| PopupWindow(Context, IAttributeSet, Int32) |
建立一個新的空白、無法聚焦的彈出視窗,尺寸為 (0,0)。 |
| PopupWindow(View, Int32, Int32) |
建立一個新的非聚焦彈出視窗,可以顯示 |
| PopupWindow(Context, IAttributeSet, Int32, Int32) |
建立一個新的、空白且無法聚焦的彈出視窗,尺寸為 (0,0)。 |
| PopupWindow(View, Int32, Int32, Boolean) |
建立一個新的彈出視窗,可以顯示 |
PopupWindow()
建立一個新的空白、無法聚焦的彈出視窗,尺寸為 (0,0)。
[Android.Runtime.Register(".ctor", "()V", "")]
public PopupWindow();
- 屬性
備註
建立一個新的空白、無法聚焦的彈出視窗,尺寸為 (0,0)。
彈出視窗不會提供任何背景資料。 這應該由內容檢視來處理。
Java 文件 android.widget.PopupWindow.PopupWindow()。
此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。
適用於
PopupWindow(Context)
建立一個新的空白、無法聚焦的彈出視窗,尺寸為 (0,0)。
[Android.Runtime.Register(".ctor", "(Landroid/content/Context;)V", "")]
public PopupWindow(Android.Content.Context? context);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;)V", "")>]
new Android.Widget.PopupWindow : Android.Content.Context -> Android.Widget.PopupWindow
參數
- context
- Context
用於存取應用程式資源與服務的上下文。
- 屬性
備註
建立一個新的空白、無法聚焦的彈出視窗,尺寸為 (0,0)。
彈出視窗確實提供了背景。
Java 文件 android.widget.PopupWindow.PopupWindow(android.content.Context)。
此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。
適用於
PopupWindow(View)
建立一個新的非聚焦彈出視窗,可以顯示 contentView。
[Android.Runtime.Register(".ctor", "(Landroid/view/View;)V", "")]
public PopupWindow(Android.Views.View? contentView);
[<Android.Runtime.Register(".ctor", "(Landroid/view/View;)V", "")>]
new Android.Widget.PopupWindow : Android.Views.View -> Android.Widget.PopupWindow
參數
- contentView
- View
彈出視窗的內容
- 屬性
備註
建立一個新的非聚焦彈出視窗,可以顯示 contentView。 視窗的維度為 (0,0)。
彈出視窗不會提供任何背景資料。 這應該由內容檢視來處理。
Java 文件 android.widget.PopupWindow.PopupWindow(android.view.View)。
此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。
適用於
PopupWindow(Context, IAttributeSet)
建立一個新的空白、無法聚焦的彈出視窗,尺寸為 (0,0)。
[Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/util/AttributeSet;)V", "")]
public PopupWindow(Android.Content.Context? context, Android.Util.IAttributeSet? attrs);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/util/AttributeSet;)V", "")>]
new Android.Widget.PopupWindow : Android.Content.Context * Android.Util.IAttributeSet -> Android.Widget.PopupWindow
參數
- context
- Context
用於存取應用程式資源與服務的上下文。
- attrs
- IAttributeSet
屬性則由 XML 提供。
- 屬性
備註
建立一個新的空白、無法聚焦的彈出視窗,尺寸為 (0,0)。
彈出視窗確實提供了背景。
Java 文件 android.widget.PopupWindow.PopupWindow(android.content.Context, android.util.AttributeSet)。
此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。
適用於
PopupWindow(Int32, Int32)
建立一個新的空白、無法聚焦的彈出視窗。
[Android.Runtime.Register(".ctor", "(II)V", "")]
public PopupWindow(int width, int height);
[<Android.Runtime.Register(".ctor", "(II)V", "")>]
new Android.Widget.PopupWindow : int * int -> Android.Widget.PopupWindow
參數
- width
- Int32
彈出視窗的寬度
- height
- Int32
彈出視窗的高度
- 屬性
備註
建立一個新的空白、無法聚焦的彈出視窗。 視窗的維度必須傳遞給此建構子。
彈出視窗不會提供任何背景資料。 這應該由內容檢視來處理。
Java 文件 android.widget.PopupWindow.PopupWindow(int, int)。
此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。
適用於
PopupWindow(IntPtr, JniHandleOwnership)
用於建立 JNI 物件受管理表示的建構器;由執行時呼叫。
protected PopupWindow(IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.Widget.PopupWindow : nativeint * Android.Runtime.JniHandleOwnership -> Android.Widget.PopupWindow
參數
- transfer
- JniHandleOwnership
JniHandleOwnershipA 指示如何處理javaReference
備註
此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。
適用於
PopupWindow(Context, IAttributeSet, Int32)
建立一個新的空白、無法聚焦的彈出視窗,尺寸為 (0,0)。
[Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/util/AttributeSet;I)V", "")]
public PopupWindow(Android.Content.Context? context, Android.Util.IAttributeSet? attrs, int defStyleAttr);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/util/AttributeSet;I)V", "")>]
new Android.Widget.PopupWindow : Android.Content.Context * Android.Util.IAttributeSet * int -> Android.Widget.PopupWindow
參數
- context
- Context
用於存取應用程式資源與服務的上下文。
- attrs
- IAttributeSet
屬性則由 XML 提供。
- defStyleAttr
- Int32
目前主題中的一個屬性,提供預設的樣式值。
- 屬性
備註
建立一個新的空白、無法聚焦的彈出視窗,尺寸為 (0,0)。
彈出視窗確實提供了背景。
此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。
適用於
PopupWindow(View, Int32, Int32)
建立一個新的非聚焦彈出視窗,可以顯示 contentView。
[Android.Runtime.Register(".ctor", "(Landroid/view/View;II)V", "")]
public PopupWindow(Android.Views.View? contentView, int width, int height);
[<Android.Runtime.Register(".ctor", "(Landroid/view/View;II)V", "")>]
new Android.Widget.PopupWindow : Android.Views.View * int * int -> Android.Widget.PopupWindow
參數
- contentView
- View
彈出視窗的內容
- width
- Int32
彈出視窗的寬度
- height
- Int32
彈出視窗的高度
- 屬性
備註
建立一個新的非聚焦彈出視窗,可以顯示 contentView。 視窗的維度必須傳遞給此建構子。
彈出視窗不會提供任何背景資料。 這應該由內容檢視來處理。
Java 文件 android.widget.PopupWindow.PopupWindow(android.view.View, int, int)。
此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。
適用於
PopupWindow(Context, IAttributeSet, Int32, Int32)
建立一個新的、空白且無法聚焦的彈出視窗,尺寸為 (0,0)。
[Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/util/AttributeSet;II)V", "")]
public PopupWindow(Android.Content.Context? context, Android.Util.IAttributeSet? attrs, int defStyleAttr, int defStyleRes);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/util/AttributeSet;II)V", "")>]
new Android.Widget.PopupWindow : Android.Content.Context * Android.Util.IAttributeSet * int * int -> Android.Widget.PopupWindow
參數
- context
- Context
用於存取應用程式資源與服務的上下文。
- attrs
- IAttributeSet
屬性則由 XML 提供。
- defStyleAttr
- Int32
目前主題中的一個屬性,提供預設的樣式值。
- defStyleRes
- Int32
一個提供預設風格值的資源。
- 屬性
備註
建立一個新的、空白且無法聚焦的彈出視窗,尺寸為 (0,0)。
彈出視窗不會提供背景資訊。
此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。
適用於
PopupWindow(View, Int32, Int32, Boolean)
建立一個新的彈出視窗,可以顯示 contentView。
[Android.Runtime.Register(".ctor", "(Landroid/view/View;IIZ)V", "")]
public PopupWindow(Android.Views.View? contentView, int width, int height, bool focusable);
[<Android.Runtime.Register(".ctor", "(Landroid/view/View;IIZ)V", "")>]
new Android.Widget.PopupWindow : Android.Views.View * int * int * bool -> Android.Widget.PopupWindow
參數
- contentView
- View
彈出視窗的內容
- width
- Int32
彈出視窗的寬度
- height
- Int32
彈出視窗的高度
- focusable
- Boolean
如果彈出視窗能聚焦,則為 true;否則為 false
- 屬性
備註
建立一個新的彈出視窗,可以顯示 contentView。 視窗的維度必須傳遞給此建構子。
彈出視窗不會提供任何背景資料。 這應該由內容檢視來處理。
Java 文件 android.widget.PopupWindow.PopupWindow(android.view.View, int, int, boolean)。
此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。