android:Dialog点击其他区域消失
2016-06-24 14:25
579 查看
只需设置属性 setCanceledOnTouchOutside为true即可。如下代码实现:
private AlertDialog menuDialog;menuDialog = new AlertDialog.Builder(this).create(); menuDialog.setCanceledOnTouchOutside(true);//点击其他区域dialog消失...... ...... ......
private AlertDialog menuDialog;menuDialog = new AlertDialog.Builder(this).create(); menuDialog.setCanceledOnTouchOutside(true);//点击其他区域dialog消失...... ...... ......
相关文章推荐
- android:SharedPreference 读取失败的原因及解决办法
- Android:DownloadManager setDestinationInExternalPublicDir(subPath, fileName)使用说明
- Android:解决列表滚动时背景色变黑的方法
- android:报Activity has leaked IntentReceiver或者receiver is not registered错误
- android.util.AndroidRuntimeException: You cannot combine custom titles with other title features
- Android:apk签名
- Android:判断某一个service是否已经在运行
- android:根据下载文件的url获取文件名
- Android:monkey测试工具
- Android java.lang.RuntimeException: Can\'t create handler inside thread that has not called Looper.prepare()
- Android:adb 启动activity、service,发送broadcast
- Android 防止Service被系统回收
- Android 点击back键两次退出程序
- Android 判断一个Service是否已经运行
- Android初学感受一
- android函数调用堆栈打印方法
- Android:View的测量/onMeasure()方法解析
- 百度定位Sdk 162错误解决方法之Android Studio
- Android 之 打包混淆ProGuard
- Android 内存泄漏总结