Is there a way to dismiss a dialog when the user clicks the transparent area around it?
I have a few little custom dialogs in my app, and they are kinda sma开发者_如何学Goll. I've noticed that the user touches the area around the dialog to try to dismiss it (similar to interaction on a website). I was wondering if there are any built in methods for doing this that I must have missed in the doc, or if there are any tutorials out there on how to approach implementing this?
I don't think I'm explaining this well, so if anyone doesn't understand what I'm talking about I will try to provide more information.
Thanks in advance.
EDIT
Found the answer in a question linked by Balaji:
dialog.setCanceledOnTouchOutside(true);
Found the answer in a question linked by Balaji:
dialog.setCanceledOnTouchOutside(true);
精彩评论