java.lang.Object | ||
↳ | com.neomades.ui.dialog.Dialog | |
↳ | com.neomades.ui.dialog.ConfirmDialog |
A confirm dialog has a title, a message and can have 2 or 3 buttons :
The text of these 3 buttons is customizable.
To enable the button 3, just set its text (see setButton3Text(int)
,
setButton3Text(String)
). This dialog will be automatically closed
when the user clicks on one of the buttons.
controller
method :
showDialog(Dialog)
.controller
method :
hideDialog()
.Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ConfirmDialog()
Constructs a confirm dialog, with 2 buttons with no text.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
setButton1Text(int resId)
Sets the text of the button 1
| ||||||||||
void |
setButton1Text(String text)
Sets the text of the button 1
| ||||||||||
void |
setButton2Text(String text)
Sets the text of the button 2
| ||||||||||
void |
setButton2Text(int resId)
Sets the text of the button 2
| ||||||||||
void |
setButton3Text(int resId)
Sets the text of the button 3.
| ||||||||||
void |
setButton3Text(String text)
Sets the text of the button 3.
| ||||||||||
void |
setDialogClickListener(DialogClickListener listener)
Sets the click listener to this dialog button.
| ||||||||||
void |
setMessage(String message)
Sets the message that will be displayed by this dialog
| ||||||||||
void |
setMessage(int resId)
Sets the message that will be displayed by this dialog
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Constructs a confirm dialog, with 2 buttons with no text.
Sets the text of the button 1
resId | the id ot the text of the button 1 |
---|
Sets the text of the button 2
resId | the id of the text of the button 2 |
---|
Sets the text of the button 3.
(Optional)
resId | the id of the text of the button 3 |
---|
Sets the text of the button 3.
(Optional)
Setting null to the text will remove the button from the dialog.
text | the text of the button 3 |
---|
Sets the click listener to this dialog button.
The method onDialogClick(Dialog, int)
of the listener will be called when the button is
clicked (null could be passed in parameter of this method)
listener | the listener |
---|
Sets the message that will be displayed by this dialog
message | the message |
---|
Sets the message that will be displayed by this dialog
resId | the id of the message |
---|