setButton

open fun setButton(whichButton: Int, text: CharSequence, msg: Message)(source)

Sets a message to be sent when a button is pressed. This method has no effect if called after show.

Parameters

whichButton

Which button to set the message for, can be one of BUTTON_POSITIVE, BUTTON_NEGATIVE, or BUTTON_NEUTRAL

text

The text to display in positive button.

msg

The Message to be sent when clicked.


open fun setButton(whichButton: Int, text: CharSequence, listener: DialogInterface.OnClickListener)(source)

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

whichButton

Which button to set the listener on, can be one of BUTTON_POSITIVE, BUTTON_NEGATIVE, or BUTTON_NEUTRAL

text

The text to display in positive button.


open fun setButton(whichButton: Int, text: CharSequence, icon: Drawable, listener: DialogInterface.OnClickListener)(source)

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

whichButton

Which button to set the listener on, can be one of BUTTON_POSITIVE, BUTTON_NEGATIVE, or BUTTON_NEUTRAL

text

The text to display in positive button.

icon

The Drawable to be set as an icon for the button.