Android Guides | Samples

Android.App.AlertDialog.GetButton Method

Gets one of the buttons used in the dialog.

Syntax

[Android.Runtime.Register("getButton", "(I)Landroid/widget/Button;", "GetGetButton_IHandler")]
public virtual Button GetButton (Int32 whichButton)

Parameters

whichButton
The identifier of the button that should be returned. For example, this can be DialogInterface.ButtonPositive.

Remarks

Gets one of the buttons used in the dialog. Returns null if the specified button does not exist or the dialog has not yet been fully created (for example, via Dialog.Show or Dialog.Create).

[Android Documentation]

Requirements

Namespace: Android.App
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 3