AlertDialog.SetButton2 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
| Name | Description |
|---|---|
| SetButton2(String, Message) |
Obsolete.
This method was deprecated in API level 15. |
| SetButton2(String, EventHandler<DialogClickEventArgs>) |
Configures the legacy negative button from a string and managed click handler. |
| SetButton2(ICharSequence, EventHandler<DialogClickEventArgs>) |
Configures the legacy negative button with text and a managed click handler. |
| SetButton2(String, IDialogInterfaceOnClickListener) |
Obsolete.
This method was deprecated in API level 15. |
| SetButton2(ICharSequence, IDialogInterfaceOnClickListener) |
Obsolete.
This method was deprecated in API level 15. |
| SetButton2(ICharSequence, Message) |
Obsolete.
This method was deprecated in API level 15. |
SetButton2(String, Message)
Caution
deprecated
This method was deprecated in API level 15.
[System.Obsolete("deprecated")]
public void SetButton2(string? text, Android.OS.Message? msg);
[<System.Obsolete("deprecated")>]
member this.SetButton2 : string * Android.OS.Message -> unit
Parameters
- text
- String
CharSequence
- msg
- Message
Message
- Attributes
Remarks
This method was deprecated in API level 15. Use setButton(int,CharSequence,Message) with DialogInterface.BUTTON_NEGATIVE.
Android reference for android.app.AlertDialog.setButton2.
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
SetButton2(String, EventHandler<DialogClickEventArgs>)
Configures the legacy negative button from a string and managed click handler.
public void SetButton2(string text, EventHandler<Android.Content.DialogClickEventArgs> handler);
member this.SetButton2 : string * EventHandler<Android.Content.DialogClickEventArgs> -> unit
Parameters
- text
- String
The string to display on the legacy negative button.
- handler
- EventHandler<DialogClickEventArgs>
The managed button-click handler to wrap as the dialog listener.
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
SetButton2(ICharSequence, EventHandler<DialogClickEventArgs>)
Configures the legacy negative button with text and a managed click handler.
public void SetButton2(Java.Lang.ICharSequence text, EventHandler<Android.Content.DialogClickEventArgs> handler);
member this.SetButton2 : Java.Lang.ICharSequence * EventHandler<Android.Content.DialogClickEventArgs> -> unit
Parameters
- text
- ICharSequence
The text to display on the legacy negative button.
- handler
- EventHandler<DialogClickEventArgs>
The managed button-click handler to wrap as the dialog listener.
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
SetButton2(String, IDialogInterfaceOnClickListener)
Caution
deprecated
This method was deprecated in API level 15.
[System.Obsolete("deprecated")]
public void SetButton2(string? text, Android.Content.IDialogInterfaceOnClickListener? listener);
[<System.Obsolete("deprecated")>]
member this.SetButton2 : string * Android.Content.IDialogInterfaceOnClickListener -> unit
Parameters
- text
- String
CharSequence: The text to display in button 2.
- listener
- IDialogInterfaceOnClickListener
DialogInterface.OnClickListener: The DialogInterface.OnClickListener to use.
- Attributes
Remarks
This method was deprecated in API level 15. Use setButton(int,CharSequence,android.content.DialogInterface.OnClickListener) with DialogInterface.BUTTON_NEGATIVE
Set a listener to be invoked when button 2 of the dialog is pressed.
Android reference for android.app.AlertDialog.setButton2.
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
SetButton2(ICharSequence, IDialogInterfaceOnClickListener)
Caution
deprecated
This method was deprecated in API level 15.
[Android.Runtime.Register("setButton2", "(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)V", "GetSetButton2_Ljava_lang_CharSequence_Landroid_content_DialogInterface_OnClickListener_Handler")]
[System.Obsolete("deprecated")]
public virtual void SetButton2(Java.Lang.ICharSequence? text, Android.Content.IDialogInterfaceOnClickListener? listener);
[<Android.Runtime.Register("setButton2", "(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)V", "GetSetButton2_Ljava_lang_CharSequence_Landroid_content_DialogInterface_OnClickListener_Handler")>]
[<System.Obsolete("deprecated")>]
abstract member SetButton2 : Java.Lang.ICharSequence * Android.Content.IDialogInterfaceOnClickListener -> unit
override this.SetButton2 : Java.Lang.ICharSequence * Android.Content.IDialogInterfaceOnClickListener -> unit
Parameters
- text
- ICharSequence
CharSequence: The text to display in button 2.
- listener
- IDialogInterfaceOnClickListener
DialogInterface.OnClickListener: The DialogInterface.OnClickListener to use.
- Attributes
Remarks
This method was deprecated in API level 15. Use setButton(int,CharSequence,android.content.DialogInterface.OnClickListener) with DialogInterface.BUTTON_NEGATIVE
Set a listener to be invoked when button 2 of the dialog is pressed.
Android reference for android.app.AlertDialog.setButton2.
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
SetButton2(ICharSequence, Message)
Caution
deprecated
This method was deprecated in API level 15.
[Android.Runtime.Register("setButton2", "(Ljava/lang/CharSequence;Landroid/os/Message;)V", "GetSetButton2_Ljava_lang_CharSequence_Landroid_os_Message_Handler")]
[System.Obsolete("deprecated")]
public virtual void SetButton2(Java.Lang.ICharSequence? text, Android.OS.Message? msg);
[<Android.Runtime.Register("setButton2", "(Ljava/lang/CharSequence;Landroid/os/Message;)V", "GetSetButton2_Ljava_lang_CharSequence_Landroid_os_Message_Handler")>]
[<System.Obsolete("deprecated")>]
abstract member SetButton2 : Java.Lang.ICharSequence * Android.OS.Message -> unit
override this.SetButton2 : Java.Lang.ICharSequence * Android.OS.Message -> unit
Parameters
- text
- ICharSequence
CharSequence
- msg
- Message
Message
- Attributes
Remarks
This method was deprecated in API level 15. Use setButton(int,CharSequence,Message) with DialogInterface.BUTTON_NEGATIVE.
Android reference for android.app.AlertDialog.setButton2.
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.