commonly used Public Method | Use |
---|---|
SetTitle(String) | Sets Title for the dialog |
SetIcon(Drawable) | Set Icon for the alert dialog |
SetMessage(string) | Set the message to display. |
SetNegativeButton(String, EventHandler) | Set a listener to be invoked when the negative button of the dialog is pressed. |
SetPositiveButton(String, EventHandler) | Set a listener to be invoked when the positive button of the dialog is pressed. |
SetNeutralButton(String, EventHandler) | Set a listener to be invoked when the neutral button of the dialog is pressed. |
SetOnCancelListener(IDialogInterfaceOnCancelListener) | Sets the callback that will be called if the dialog is canceled. |
SetOnDismissListener(IDialogInterfaceOnDismissListener) | Sets the callback that will be called when the dialog is dismissed for any reason. |
Show() | Creates a AlertDialog with the arguments supplied to this builder and Dialog.Show's the dialog. |
Requirements
Namespace: Android.App
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Public Constructors
AlertDialog.Builder(Context) :-
Constructor using a context for this builder and the AlertDialog it creates.
AlertDialog.Builder(Context, Int32) :-
Constructor using a context and theme for this builder and the AlertDialog it creates.
Using Material Design AlertDialog
In order to use the modern AlertDialog:
using AlertDialog = Android.Support.V7.App.AlertDialog;