I have a dialogfragment, which should dismiss, if i click outside of the dialog. I have no button or something else to close the dialog.
But before the dismiss is calling, I want to check a field in my dialog. If the check is positive, then the dialog should close, else not.
Which method can I override to do that? Or can I do it manual with a onTouchListener, which dismiss the dialog, if I'm clicking beside?