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(安卓)LinearLayout 嵌套 button 监听LinearLayout的onCl
  2. android-listview控件
  3. Android(安卓)自定义格式的对话框
  4. Android(安卓)Compatibility zoom dialog 关闭
  5. Android(安卓)Compatibility zoom dialog 关闭
  6. Android(安卓)仿IOS搜索框
  7. 【Android】Android中AlertDialog对话框的使用实例
  8. 旋转对话框
  9. Android(安卓)第三方应用监听home键

随机推荐

  1. 【Android】混合开发之WebView的介绍及使
  2. Android(安卓)布局阴影实现
  3. Android怎么办? iPad 2降价100美元继续出
  4. Android(安卓)Studio下运行开源项目9GAG
  5. 处女男学Android(三)---Handler简介以及初
  6. Android图片内存优化-Android(安卓)8.0上
  7. 实时改变配置
  8. 为Android应用程序读取/dev下设备而提权(
  9. Android多渠道打包相关介绍
  10. Android手机软件汉化教程---第五课 打包