Android Dialog

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Parameters

LineDescription
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 call create() then show() on the AlertDialog instance



Got any Android Question?