I have a dialog, which is cancelable, if I click beside of my dialog. But before closing the dialog, I want to check a field and if the check is negative, then the dialog should not close. I thought, that I could do that, if I override the onDismiss() method, but it doesn't work.
Which method I have to override to do the check and decide, if the dialog should close or stay open? Thanks for help :)