Udostępnij za pośrednictwem


AlertDialog.SetButton2 Method

Definition

Overloads

SetButton2(String, EventHandler<DialogClickEventArgs>)
SetButton2(String, Message)
Obsolete.

This member is deprecated.

SetButton2(String, IDialogInterfaceOnClickListener)
Obsolete.

Set a listener to be invoked when button 2 of the dialog is pressed.

SetButton2(ICharSequence, Message)
Obsolete.

This member is deprecated.

SetButton2(ICharSequence, IDialogInterfaceOnClickListener)
Obsolete.

Set a listener to be invoked when button 2 of the dialog is pressed.

SetButton2(ICharSequence, EventHandler<DialogClickEventArgs>)

SetButton2(String, EventHandler<DialogClickEventArgs>)

public void SetButton2 (string text, EventHandler<Android.Content.DialogClickEventArgs> handler);
member this.SetButton2 : string * EventHandler<Android.Content.DialogClickEventArgs> -> unit

Parameters

text
String

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, Message)

Caution

deprecated

This member is deprecated.

[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

The text to display in button 2.

msg
Message
Attributes

Remarks

This member is deprecated. Use #setButton(int, CharSequence, Message) with DialogInterface#BUTTON_NEGATIVE.

Java documentation for android.app.AlertDialog.setButton2(java.lang.CharSequence, android.os.Message).

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

Set a listener to be invoked when button 2 of the dialog is pressed.

[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

The text to display in button 2.

listener
IDialogInterfaceOnClickListener

The DialogInterface.OnClickListener to use.

Attributes

Remarks

Java documentation for android.app.AlertDialog.setButton2(java.lang.CharSequence, android.content.OnClickListener).

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 member is deprecated.

[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

The text to display in button 2.

msg
Message
Attributes

Remarks

This member is deprecated. Use #setButton(int, CharSequence, Message) with DialogInterface#BUTTON_NEGATIVE.

Java documentation for android.app.AlertDialog.setButton2(java.lang.CharSequence, android.os.Message).

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

Set a listener to be invoked when button 2 of the dialog is pressed.

[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

The text to display in button 2.

listener
IDialogInterfaceOnClickListener

The DialogInterface.OnClickListener to use.

Attributes

Remarks

Java documentation for android.app.AlertDialog.setButton2(java.lang.CharSequence, android.content.OnClickListener).

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>)

public void SetButton2 (Java.Lang.ICharSequence text, EventHandler<Android.Content.DialogClickEventArgs> handler);
member this.SetButton2 : Java.Lang.ICharSequence * EventHandler<Android.Content.DialogClickEventArgs> -> unit

Parameters

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