如何在对话外摸抓事件? [英] How to catch event when touched outside the Dialog?
本文介绍了如何在对话外摸抓事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有我的应用程序的对话框。我想,当用户单击该对话框外抓事件。我有什么做的呢?
I have a dialog for my application. I want to catch event when the user clicks outside the dialog. What do I have to do for this?
感谢所有!
推荐答案
对话框
的 setCanceledOnTouchOutside(布尔)
方法。如果您传递true作为参数对话框就会解雇你时,它的窗口的边界之外触摸
Dialog
has the setCanceledOnTouchOutside(boolean)
method. If you pass true as parameter the dialog will be dismiss when you touch outside the bounds of its window
这篇关于如何在对话外摸抓事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文