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
0
投稿

猜你喜欢

  • 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
  • 详解Java并发编程之原子类

    2022-05-28 01:36:06
  • 浅谈java的byte数组的不同写法

    2023-03-10 07:53:12
  • idea生成类注释和方法注释的正确方法(推荐)

    2022-09-11 03:45:14
  • 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
  • Java 中泛型 T 和 ? 的区别详解

    2022-07-08 00:40:28
  • Java中使用websocket实现在线聊天功能

    2023-01-03 22:07:20
  • Android EditText长按菜单中分享功能的隐藏方法

    2021-08-27 19:30:45
  • Entity Framework主从表的增删改

    2023-10-05 18:56:27
  • Java技巧函数方法实现二维数组遍历

    2023-09-12 23:25:00
  • C#如何给枚举类型增加一个描述特性详解

    2022-08-17 15:02:43
  • Java实现FTP批量大文件上传下载篇2

    2021-07-22 02:30:31
  • java 如何远程控制tomcat启动关机

    2023-04-10 03:21:47
  • Java StringBuffer与StringBuilder有什么区别

    2022-12-15 22:35:12
  • SpringBoot项目打成war和jar的区别说明

    2023-10-05 04:54:15
  • asp之家 软件编程 m.aspxhome.com