本文介紹了Android:觸摸時關閉對話框窗口的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
我想通過簡單地觸摸屏幕來關閉我的 Android 應用程序中的對話框窗口.這可能嗎?如果有,怎么做?
I'd like to close a dialog window in my android app by simply touching the screen.. is this possible? If so, how?
我已經考慮在對話框上設置一些onClickEven",但它不存在.
I've looked into setting some "onClickEven" on the dialog, but it doesnt exist.
這怎么可能?
推薦答案
您可以使用 dialog.setCanceledOnTouchOutside(true);
如果您在對話框外觸摸 u=,它將關閉對話框.
You can use dialog.setCanceledOnTouchOutside(true);
which will close the dialog if you touch u=outside the dialog.
這篇關于Android:觸摸時關閉對話框窗口的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!