Dialog
suggest changeParameters
| Line | Description| |—|—| |show();| Shows the dialog| | setContentView(R.layout.yourlayout); | sets the ContentView of the dialog to your custom layout. | | dismiss()| Closes the dialog
Remarks
- The dialog in the first example(Dialog) does not need to call
show()
when it is created as it is handled in the constructor - Alert Dialogs must be constructed through a new instance of the
AlertDialog.Builder()
class. Following the Builder Pattern, all members of the AlertDialog.Builder can be method chained to ‘build up’ the dialog instance. - The Alert Dialog builder can directly
show()
the dialog – you do not need to callcreate()
thenshow()
on the AlertDialog instance
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents