How to dismiss a DialogFragment when pressing outside the dialog? 怎么通过点击DialogFragment的外部透明隐藏它
2016-10-25 18:10
344 查看
引用:http://stackoverflow.com/questions/8404140/how-to-dismiss-a-dialogfragment-when-pressing-outside-the-dialog
DialogFragment.getDialog().setCanceledOnTouchOutside(true);Must be called in
onCreateView(必须在onCreateView中调用,因为此时dialog才存在,不然空指针)
相关文章推荐
- How to workaround the IE default behavior of re-posting the entire form when pressing "刷新"(or F5)
- fragment点击跳转到外部Activity后,怎么通过返回按钮返回
- How to invoke the method of managed bean and render view in JSF when we are outside the lifecycle of JSF
- How to hide the OK button in the dialog in .Net Compact Framework application?
- 需求调研中的5W+1H定律(WHY、WHAT、WHO、WHEN、WHERE + HOW TO ACCOMPLISH THE SYSTEM)
- AxWindowsMediaPlayer how to make the Tracker disappear when playing
- How to open the dialog out of iframe by using jquery dialog
- How to release the port of TCP Client immediately when the connection is disconnect with the TCP server. - TCP 客户端与 TCP 服务器断开连接后
- How to solve problem caused when the CRT library and MFC libraries are linked in the wrong order
- how to create an explorer interface on a dialog using the MFC
- How to use the CAknWaitDialog
- How to umount when the device is busy
- How to Hook the Mouse to Catch Events Outside of your application
- How to solve the problem witch is the system send many emails when cron have something wrong
- When and how to trace who and when alter the table
- [转载]How to hide the OK button in the dialog in .Net Compact Framework application?
- How to resolve the problem "Could not download sliverlight application" when doing deployment
- How to solve the linking errors when using the ATOMIC functions
- use noscript html tag when user disable the javascript in browser, guide user how to enable the js in different browser and retu
- How to load the specified mscordacwks.dll for managed debugging when multiple .NET runtime are loaded in one process