Alex Rivera | Logout

How to dismiss a Dialog in Android by clicking it inside?

Asked 2012-02-07T21:18:26.350
8

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?

Edit
Report

1 Answer

0

Here is an example which explains how to handle onTouch events within the dialog. The trick is in creating a custom listener.

http://about-android.blogspot.co.uk/2010/02/create-custom-dialog.html

answered 2012-10-05T13:52:31.470

Your Answer