AlertDialog.Builder.SetPositiveButton Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
SetPositiveButton(String, EventHandler<DialogClickEventArgs>) | |
SetPositiveButton(Int32, EventHandler<DialogClickEventArgs>) | |
SetPositiveButton(String, IDialogInterfaceOnClickListener) | |
SetPositiveButton(ICharSequence, EventHandler<DialogClickEventArgs>) | |
SetPositiveButton(ICharSequence, IDialogInterfaceOnClickListener) |
Set a listener to be invoked when the positive button of the dialog is pressed. |
SetPositiveButton(Int32, IDialogInterfaceOnClickListener) |
Set a listener to be invoked when the positive button of the dialog is pressed. |
SetPositiveButton(String, EventHandler<DialogClickEventArgs>)
public Android.App.AlertDialog.Builder? SetPositiveButton (string text, EventHandler<Android.Content.DialogClickEventArgs> handler);
member this.SetPositiveButton : string * EventHandler<Android.Content.DialogClickEventArgs> -> Android.App.AlertDialog.Builder
Parameters
- text
- String
- handler
- EventHandler<DialogClickEventArgs>
Returns
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
SetPositiveButton(Int32, EventHandler<DialogClickEventArgs>)
public Android.App.AlertDialog.Builder? SetPositiveButton (int textId, EventHandler<Android.Content.DialogClickEventArgs> handler);
member this.SetPositiveButton : int * EventHandler<Android.Content.DialogClickEventArgs> -> Android.App.AlertDialog.Builder
Parameters
- textId
- Int32
- handler
- EventHandler<DialogClickEventArgs>
Returns
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
SetPositiveButton(String, IDialogInterfaceOnClickListener)
public Android.App.AlertDialog.Builder SetPositiveButton (string text, Android.Content.IDialogInterfaceOnClickListener listener);
member this.SetPositiveButton : string * Android.Content.IDialogInterfaceOnClickListener -> Android.App.AlertDialog.Builder
Parameters
- text
- String
- listener
- IDialogInterfaceOnClickListener
Returns
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
SetPositiveButton(ICharSequence, EventHandler<DialogClickEventArgs>)
public Android.App.AlertDialog.Builder? SetPositiveButton (Java.Lang.ICharSequence text, EventHandler<Android.Content.DialogClickEventArgs> handler);
member this.SetPositiveButton : Java.Lang.ICharSequence * EventHandler<Android.Content.DialogClickEventArgs> -> Android.App.AlertDialog.Builder
Parameters
- text
- ICharSequence
- handler
- EventHandler<DialogClickEventArgs>
Returns
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
SetPositiveButton(ICharSequence, IDialogInterfaceOnClickListener)
Set a listener to be invoked when the positive button of the dialog is pressed.
[Android.Runtime.Register("setPositiveButton", "(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;", "GetSetPositiveButton_Ljava_lang_CharSequence_Landroid_content_DialogInterface_OnClickListener_Handler")]
public virtual Android.App.AlertDialog.Builder SetPositiveButton (Java.Lang.ICharSequence text, Android.Content.IDialogInterfaceOnClickListener listener);
[<Android.Runtime.Register("setPositiveButton", "(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;", "GetSetPositiveButton_Ljava_lang_CharSequence_Landroid_content_DialogInterface_OnClickListener_Handler")>]
abstract member SetPositiveButton : Java.Lang.ICharSequence * Android.Content.IDialogInterfaceOnClickListener -> Android.App.AlertDialog.Builder
override this.SetPositiveButton : Java.Lang.ICharSequence * Android.Content.IDialogInterfaceOnClickListener -> Android.App.AlertDialog.Builder
Parameters
- text
- ICharSequence
The text to display in the positive button
- listener
- IDialogInterfaceOnClickListener
The IDialogInterfaceOnClickListener to use.
Returns
- Attributes
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
SetPositiveButton(Int32, IDialogInterfaceOnClickListener)
Set a listener to be invoked when the positive button of the dialog is pressed.
[Android.Runtime.Register("setPositiveButton", "(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;", "GetSetPositiveButton_ILandroid_content_DialogInterface_OnClickListener_Handler")]
public virtual Android.App.AlertDialog.Builder SetPositiveButton (int textId, Android.Content.IDialogInterfaceOnClickListener listener);
[<Android.Runtime.Register("setPositiveButton", "(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;", "GetSetPositiveButton_ILandroid_content_DialogInterface_OnClickListener_Handler")>]
abstract member SetPositiveButton : int * Android.Content.IDialogInterfaceOnClickListener -> Android.App.AlertDialog.Builder
override this.SetPositiveButton : int * Android.Content.IDialogInterfaceOnClickListener -> Android.App.AlertDialog.Builder
Parameters
- textId
- Int32
The resource id of the text to display in the positive button
- listener
- IDialogInterfaceOnClickListener
The IDialogInterfaceOnClickListener to use.
Returns
- Attributes
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.