java.lang.Object | |
↳ | com.neomades.ui.dialog.Dialog |
![]() |
Simple Dialog popup with custom content.
Title is optional (set title to null in order to hide the title)
controller
method :
showDialog(Dialog)
.controller
method :
hideDialog()
.Content could be any type of view.
By default, a dialog is cancellable in all platforms except iOS.
setCancellable(true)
in
iOS will be ignored!Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Dialog() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
hide()
Hides this dialog (if shown).
| ||||||||||
boolean | isShown() | ||||||||||
void |
setCancellable(boolean cancellable)
Sets if the dialog is cancellable with the BACK button.
| ||||||||||
void |
setContent(View content)
Set content of the dialog.
| ||||||||||
void |
setTitle(String title)
Sets the title of this dialog
| ||||||||||
void |
setTitle(int resId)
Sets the title of this dialog
| ||||||||||
void |
show()
Shows this dialog in top of the current screen.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Hides this dialog (if shown).
Warning : this method has to be called from the UI-Thread. Use
runOnUiThread(Runnable)
if you are on another thread
CrossThreadException | if the method is called from outside the UI-Thread |
---|
Sets if the dialog is cancellable with the BACK button. If the parameter is true, the dialog can be cancelled with the BACK key, and then will be closed, else the BACK key won't do nothing.
By default, a dialog is cancellable in all platforms except iOS.
setCancellable(true)
in iOS will be ignored!cancellable | true if the dialog can be cancelled, else false |
---|
Set content of the dialog.
content | any type of View |
---|
Sets the title of this dialog
resId | the id of the title |
---|
Shows this dialog in top of the current screen.
Note: Only one dialog can be shown in top of screen.
Warning : this method has to be called from the UI-Thread. Use
runOnUiThread(Runnable)
if you are on another thread
When a dialog is shown, the screen behind it will keep its state (not paused, not resumed).
CrossThreadException | if the method is called from outside the UI-Thread |
---|