AlertDialog Constructors

Definition

Overloads

AlertDialog(Context)

Creates an alert dialog that uses the default alert dialog theme.

AlertDialog(Context, Int32)

Creates an alert dialog that uses an explicit theme resource.

AlertDialog(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

AlertDialog(Context, Boolean, IDialogInterfaceOnCancelListener)

Creates an alert dialog that uses the default alert dialog theme.

AlertDialog(Context, Boolean, EventHandler)

AlertDialog(Context)

Creates an alert dialog that uses the default alert dialog theme.

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

Parameters

context
Context

the parent context

Attributes

Remarks

Java documentation for android.app.AlertDialog.AlertDialog(android.content.Context).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

AlertDialog(Context, Int32)

Creates an alert dialog that uses an explicit theme resource.

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

Parameters

context
Context

the parent context

themeResId
Int32

the resource ID of the theme against which to inflate this dialog, or 0 to use the parent context's default alert dialog theme

Attributes

Remarks

Java documentation for android.app.AlertDialog.AlertDialog(android.content.Context, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

AlertDialog(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

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

Parameters

javaReference
IntPtr

nativeint

A IntPtrcontaining a Java Native Interface (JNI) object reference.

transfer
JniHandleOwnership

A JniHandleOwnershipindicating how to handle javaReference

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

AlertDialog(Context, Boolean, IDialogInterfaceOnCancelListener)

Creates an alert dialog that uses the default alert dialog theme.

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;ZLandroid/content/DialogInterface$OnCancelListener;)V", "")]
protected AlertDialog (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.AlertDialog : Android.Content.Context * bool * Android.Content.IDialogInterfaceOnCancelListener -> Android.App.AlertDialog

Parameters

context
Context

the parent context

cancelable
Boolean
Attributes

Remarks

Java documentation for android.app.AlertDialog.AlertDialog(android.content.Context).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

AlertDialog(Context, Boolean, EventHandler)

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

Parameters

context
Context
cancelable
Boolean
cancelHandler
EventHandler

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to