Any ideas...? Using import androidx.fragment.app.DialogFragment, I want to close the dialog when the user touches it. Touch outside dialog closes the dialog (good). I tried
dialog!!.setCancelable(true) // no effect
dialog!!.onTouchEvent...// not intuitive solution
There is no onClick event and I do not want a button. Thanks
If you want close dialog even you touch inside dialog, you can try this:
And call DialogFragment from another view:
Here I'm using kotlin, convert to java if you wan't. Hope it helpful