语言

Dialog 构造函数

定义

重载

名称 说明
Dialog(Context)

创建使用默认对话主题的对话框窗口。

Dialog(Context, Int32)

创建使用自定义对话样式的对话框窗口。

Dialog(IntPtr, JniHandleOwnership)

初始化现有 Java Native Interface 对象的托管表示形式。

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

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于

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

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于

Dialog(IntPtr, JniHandleOwnership)

初始化现有 Java Native Interface 对象的托管表示形式。

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

参数

javaReference
IntPtr

nativeint

Java Native Interface 对象引用。

transfer
JniHandleOwnership

要应用于 Java Native Interface 对象引用的所有权转让。

注解

当为现有Java对象创建托管对等时,此构造函数由 Android 绑定运行时的 .NET 调用。

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于

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

上下文:此值不能为 null。

cancelable
Boolean

boolean

cancelListener
IDialogInterfaceOnCancelListener

DialogInterface.OnCancelListener:此值可能为 null。

特性

注解

Android 参考。android.app.Dialog.Dialog

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于

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

要包装为取消侦听器的托管处理程序。

注解

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于