setButton
Sets a message to be sent when a button is pressed. This method has no effect if called after show.
Parameters
Which button to set the message for, can be one of BUTTON_POSITIVE, BUTTON_NEGATIVE, or BUTTON_NEUTRAL
The text to display in positive button.
The Message to be sent when clicked.
Sets a listener to be invoked when the positive button of the dialog is pressed. This method has no effect if called after show.
Parameters
Which button to set the listener on, can be one of BUTTON_POSITIVE, BUTTON_NEGATIVE, or BUTTON_NEUTRAL
The text to display in positive button.
The DialogInterface.OnClickListener to use.
Sets an icon to be displayed along with the button text and a listener to be invoked when the positive button of the dialog is pressed. This method has no effect if called after show.
Parameters
Which button to set the listener on, can be one of BUTTON_POSITIVE, BUTTON_NEGATIVE, or BUTTON_NEUTRAL
The text to display in positive button.
The DialogInterface.OnClickListener to use.
The Drawable to be set as an icon for the button.