Material-dialogs: Touching outside the dialog dismiss the dialog

Created on 29 Jul 2019  路  2Comments  路  Source: afollestad/material-dialogs

Library Version:

3.1.0

Affected Device(s):

Motorola XT1572

Describe the Bug:

I've a simple input dialog with one EditText,

MaterialDialog(this).show {
            noAutoDismiss()
            title(res = R.string.title_name)
            input()
            positiveButton(R.string.action_save_name)
}

and when I click the outside the dialog, the dialog got dismissed.

To Reproduce:

  1. Create an input dialog with noAutoDismiss and show
MaterialDialog(this).show {
            noAutoDismiss()
            title(res = R.string.title_name)
            input()
            positiveButton(R.string.action_save_name)
}
  1. Touch outside the dialog

Expected Behavior:

The dialog shouldn't dismiss

or Is there any other flag to prevent autoDismiss on outside dialog touch ?

questiodiscussion

Most helpful comment

AFAIK, this is the standard behavior of a dialog in android. But you can deny it via cancelOnTouchOutside().

All 2 comments

AFAIK, this is the standard behavior of a dialog in android. But you can deny it via cancelOnTouchOutside().

That's what I was searching for. Thanks Simon :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

arpanbag001 picture arpanbag001  路  4Comments

bahmandamia6982 picture bahmandamia6982  路  6Comments

jlelse picture jlelse  路  6Comments

imcloud picture imcloud  路  5Comments

sarthak1996 picture sarthak1996  路  6Comments