how to close dialog box in android studio code example Example: close dialog android if (dialog.isShowing) { dialog.dismiss() }