語言

Dialog 建構函式

定義

多載

名稱 Description
Dialog(Context)

建立一個使用預設對話主題的對話視窗。

Dialog(Context, Int32)

建立一個使用自訂對話樣式的對話視窗。

Dialog(IntPtr, JniHandleOwnership)

初始化現有 Java 原生介面物件的受管理表示。

Dialog(Context, Boolean, IDialogInterfaceOnCancelListener)

建立一個使用預設對話主題的對話視窗。

Dialog(Context, Boolean, EventHandler)

Dialog(Context)

建立一個使用預設對話主題的對話視窗。

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;)V", "")]
public Dialog(Android.Content.Context context);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;)V", "")>]
new Android.App.Dialog : Android.Content.Context -> Android.App.Dialog

參數

context
Context

對話應該在的情境中進行

屬性

備註

建立一個使用預設對話主題的對話視窗。 所提供的上下文用來取得視窗管理器和用於呈現對話框的基底主題。

另請參閱:

Android 參考資料。android.app.Dialog.Dialog

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

適用於

Dialog(Context, Int32)

建立一個使用自訂對話樣式的對話視窗。

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;I)V", "")]
public Dialog(Android.Content.Context context, int themeResId);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;I)V", "")>]
new Android.App.Dialog : Android.Content.Context * int -> Android.App.Dialog

參數

context
Context

對話應該在的情境中進行

themeResId
Int32

一個描述可用於視窗 0 或預設對話主題的樣式資源

屬性

備註

建立一個使用自訂對話樣式的對話視窗。 所提供的上下文用來取得視窗管理器和用於呈現對話框的基底主題。 所提供的主題會套用在情境主題之上。 請參閱風格與主題資源,了解更多關於定義與使用風格的資訊。

Android 參考資料。android.app.Dialog.Dialog

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

適用於

Dialog(IntPtr, JniHandleOwnership)

初始化現有 Java 原生介面物件的受管理表示。

protected Dialog(IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.App.Dialog : nativeint * Android.Runtime.JniHandleOwnership -> Android.App.Dialog

參數

javaReference
IntPtr

nativeint

Java 原生介面物件參考。

transfer
JniHandleOwnership

所有權轉移應用於 Java 原生介面物件參考。

備註

當 .NET 為 Android 綁定執行時建立一個受管理的 Java 物件時,會呼叫這個建構子。

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

適用於

Dialog(Context, Boolean, IDialogInterfaceOnCancelListener)

建立一個使用預設對話主題的對話視窗。

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;ZLandroid/content/DialogInterface$OnCancelListener;)V", "")]
protected Dialog(Android.Content.Context context, bool cancelable, Android.Content.IDialogInterfaceOnCancelListener? cancelListener);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;ZLandroid/content/DialogInterface$OnCancelListener;)V", "")>]
new Android.App.Dialog : Android.Content.Context * bool * Android.Content.IDialogInterfaceOnCancelListener -> Android.App.Dialog

參數

context
Context

背景說明:此值不可能是零值。

cancelable
Boolean

boolean

cancelListener
IDialogInterfaceOnCancelListener

DialogInterface.OnCancelListener:此值可能是空值。

屬性

備註

Android 參考資料。android.app.Dialog.Dialog

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

適用於

Dialog(Context, Boolean, EventHandler)

protected Dialog(Android.Content.Context context, bool cancelable, EventHandler cancelHandler);
new Android.App.Dialog : Android.Content.Context * bool * EventHandler -> Android.App.Dialog

參數

context
Context
cancelable
Boolean
cancelHandler
EventHandler

備註

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

適用於