AlertDialog 点击按钮后不关闭的处理办法
来源:互联网 发布:七牛域名冲突 编辑:程序博客网 时间:2024/04/29 16:01
newAlertDialog.Builder(this).setPositiveButton(newString("确定"),newDialogInterface.OnClickListener() { @OverridepublicvoidonClick( DialogInterface dialog,intwhich ){if(判断条件 ){//条件不成立不能关闭 AlertDialog窗口try{Field field = dialog.getClass().getSuperclass().getDeclaredField("mShowing");field.setAccessible(true);field.set( dialog,false);// false -使之不能关闭(此为机关所在,其它语句相同)}catch( Exception e ){Log.e( e.getMessage() );e.printStackTrace();}}else{//条件成立能关闭 AlertDialog窗口try{Field field = dialog.getClass().getSuperclass().getDeclaredField("mShowing");field.setAccessible(true);field.set( dialog,true);// true -使之可以关闭(此为机关所在,其它语句相同)}catch(Exception e){e.printStackTrace();}}}
0 0
- AlertDialog 点击按钮后不关闭的处理办法
- AlertDialog 点击按钮后不关闭的处理办法
- AlertDialog 点击按钮后不关闭的处理办法
- AlertDialog 点击按钮后不关闭的处理办法
- AlertDialog点击按钮后对话框不消失的处理方法
- AlertDialog点击按钮后对话框不消失的处理方法
- 让AlertDialog在点击按钮后不消失、不关闭
- 让AlertDialog在点击按钮后不消失、不关闭
- 【Android】AlertDialog点击按钮后不自动关闭对话框
- 点击AlertDialog的按钮时,不自动关闭对话框
- 点击AlertDialog按钮不关闭对话框
- 实现 AlertDialog 点击确定按钮不关闭
- Android的AlertDialog点击确定后不关闭示例
- android alertdialog的按钮点击后不消失
- Android alertdialog的按钮点击后不消失
- AlertDialog点击按钮后不消失
- AlertDialog 利用反射使得点击按钮使对话框不关闭
- Android设置AlertDialog点击按钮对话框不关闭(转)
- Apache Atlas安装文档
- liunx vim常用设置
- 如何在ListView中的TextView显示跑马灯效果?
- Java注解基础(一)
- python实现进度条--主要用在上传下载文件
- AlertDialog 点击按钮后不关闭的处理办法
- 线程优化-使用线程池ThreadPoolExecutor
- JAVA面试2
- 使用RPM包安装docker1.10.3脚本
- Java-jVM-虚拟机判定两个 Java 类是相同
- 国内从事机器视觉领域的公司
- 【蓝桥杯】穿越雷区-java语言描述
- 蓝桥杯 历届试题 显示二叉树
- android - 广播接收器