Am using google new material design text input layout as custom view and I want to validate input before closing the dialog however when I click the positive button the dialog closes without validation. How do I control the dialog not closing till I want it to?
Take a look at the Readme.md
_"If autoDismiss is turned off, then you must manually dismiss the dialog in the callback. Auto dismiss is on by default."_
Set autoDismiss to false when creating the Dialog:
MaterialDialog dialog = new MaterialDialog.Builder(getActivity())
.autoDismiss(false)
.build();
Later you can close the dialog by calling dismiss on the instance:
materialDialog.dismiss();
Thanks for this.
On Thu, Oct 1, 2015 at 10:45 AM Kai Eckardt [email protected]
wrote:
Take a look at the Readme.md
_"If autoDismiss is turned off, then you must manually dismiss the dialog
in the callback. Auto dismiss is on by default."_Set autoDismiss to false when creating the Dialog:
MaterialDialog dialog = new MaterialDialog.Builder(getActivity())
.autoDismiss(false)
.build();Later you can close the dialog by calling dismiss on the instance:
materialDialog.dismiss();
—
Reply to this email directly or view it on GitHub
https://github.com/afollestad/material-dialogs/issues/731#issuecomment-144692086
.
Please one more thing, how do I show the keyboard when the dialog is showing.
This question is not specific for the material dialogs. Please try to find a solution using google or StackOverflow next time. For examle: http://stackoverflow.com/a/2418314
ok. thanks
Most helpful comment
Take a look at the Readme.md
_"If autoDismiss is turned off, then you must manually dismiss the dialog in the callback. Auto dismiss is on by default."_
Set autoDismiss to false when creating the Dialog:
Later you can close the dialog by calling dismiss on the instance: