android 获取对话框关闭事件
16lz
2021-01-23
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
更多相关文章
- Android 自定义格式的对话框
- android四种不同的事件实现
- 【Android】Android中AlertDialog对话框的使用实例
- 旋转对话框
- android双击事件
- android的对话框
- Android截取开机关机事件
- Android中各种ontouch事件
- Android 事件处理