Android中ProgressDialog的dismiss()与cancel()方法的区别
作者:qq_20252351 时间:2021-07-27 04:14:24
progressDialog, 它有两个方法dialog.cancel() 和 dialog.dimiss()
1. public void cancel ()
Since: API Level 1
Cancel the dialog. This is essentially the same as calling dismiss(), but it will also call your DialogInterface.OnCancelListener (if registered).
2.public void dismiss ()
Since: API Level 1
Dismiss this dialog, removing it from the screen. This method can be invoked safely from any thread. Note that you should not override this method to do cleanup when the dialog is dismissed, instead implement that in onStop().
其中,采用cancel()方法会调用DialogInterface.OnCancelListener ()。
来源:http://blog.csdn.net/qq_20252351/article/details/68952345
标签:android,progressdialog
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Unity实现俄罗斯方块(三)
2022-02-01 19:07:14
浅谈Java(SpringBoot)基于zookeeper的分布式锁实现
2023-11-16 08:14:56
java.math.BigDecimal的用法及加减乘除计算
2022-01-15 15:55:20
Java深入浅出理解快速排序以及优化方式
2023-01-17 13:50:44
![](https://img.aspxhome.com/file/2023/9/69319_0s.jpg)
详解Java并发编程之原子类
2022-05-28 01:36:06
浅谈java的byte数组的不同写法
2023-03-10 07:53:12
idea生成类注释和方法注释的正确方法(推荐)
2022-09-11 03:45:14
![](https://img.aspxhome.com/file/2023/4/85554_0s.jpg)
logback输出日志屏蔽quartz的debug等级日志方式
2023-08-04 23:40:04
讲解.NET环境下绘制模糊数学中隶属函数分布图第1/5页
2022-10-04 10:21:51
SpringBoot中 Jackson 日期的时区和日期格式问题解决
2021-09-06 19:37:50
![](https://img.aspxhome.com/file/2023/6/67446_0s.png)
Java 中泛型 T 和 ? 的区别详解
2022-07-08 00:40:28
![](https://img.aspxhome.com/file/2023/8/64748_0s.png)
Java中使用websocket实现在线聊天功能
2023-01-03 22:07:20
![](https://img.aspxhome.com/file/2023/7/91097_0s.png)
Android EditText长按菜单中分享功能的隐藏方法
2021-08-27 19:30:45
![](https://img.aspxhome.com/file/2023/0/89510_0s.png)
Entity Framework主从表的增删改
2023-10-05 18:56:27
Java技巧函数方法实现二维数组遍历
2023-09-12 23:25:00
![](https://img.aspxhome.com/file/2023/9/58469_0s.png)
C#如何给枚举类型增加一个描述特性详解
2022-08-17 15:02:43
![](https://img.aspxhome.com/file/2023/4/85744_0s.png)
Java实现FTP批量大文件上传下载篇2
2021-07-22 02:30:31
![](https://img.aspxhome.com/file/2023/3/83123_0s.jpg)
java 如何远程控制tomcat启动关机
2023-04-10 03:21:47
![](https://img.aspxhome.com/file/2023/0/60760_0s.png)
Java StringBuffer与StringBuilder有什么区别
2022-12-15 22:35:12
SpringBoot项目打成war和jar的区别说明
2023-10-05 04:54:15
![](https://img.aspxhome.com/file/2023/1/89501_0s.png)