I have seen several posts on how to dismiss a dialog by clicking on the outside. But is there a way to get the same functionality by clicking the inside the dialog window?
Are there any listeners for the Dialog that would detect a tap on the Dialog Window?
Overriding
Dialog.onTouchEvent(...)catches any tap, anywhere on the screen. To dismiss the dialog by tapping anywhere:This snippet nullifies the need to call
dialogObject.setCanceledOnTouchOutside(true);.