android中如果想要监听对话框是否已经关闭可以使用

DialogInterface.OnDismissListener

就可以监听到当对话框关闭的事件。


1. void onDismiss(DialogInterface dialog) 
          This method will be invoked when the dialog is dismissed.


 

void onDismiss(DialogInterface dialog)
This method will be invoked when the dialog is dismissed.

参数:
dialog - The dialog that was dismissed will be passed into themethod.

2.实例

dialog.setOnDismissListener(new OnDismissListener() {
            
            @Override
            public void onDismiss(DialogInterface dialog) {
                 //处理监听事件
            }
        });


转自:http://www.apihome.cn/api/android/DialogInterface.OnDismissListener.html

更多相关文章

  1. Android 自定义格式的对话框
  2. android四种不同的事件实现
  3. 【Android】Android中AlertDialog对话框的使用实例
  4. 旋转对话框
  5. android双击事件
  6. android的对话框
  7. Android截取开机关机事件
  8. Android中各种ontouch事件
  9. Android 事件处理

随机推荐

  1. Android之Handler、Looper、MessageQueue
  2. android Service 简单例子
  3. Android线程间通信-Handler消息机制
  4. 简单android拨号器的实现
  5. 单例模式之传递Context参数
  6. android是32-bit系统还是64-bit系统
  7. 自定义简单的ProgressBar
  8. Android内存分配的注意事项
  9. Android修改开机Logo和开机动画
  10. 学习Android从搭建环境的问题开始