推扬网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
推扬网 门户 经验分享 查看内容

Android中ProgressDialog的dismiss()与cancel()方法的区别

2020-4-11 13:59| 发布者: admin| 查看: 394| 评论: 0

本文主要介绍了Android中ProgressDialog的dismiss()与cancel()方法的区别,具有很好的参考价值。下面跟着小编一起来看下吧

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 ()。

以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,同时也希望多多支持推扬网www.tuiyang.com!


鲜花

握手

雷人

路过

鸡蛋

最新评论

精选推荐

    广告服务|投稿要求|禁言标准|版权说明|免责声明|手机版|小黑屋|推扬网 ( 粤ICP备18134897号 )|网站地图 | 邮箱:vayae@hotmail.com

    GMT+8, 2025-6-17 11:52 , Processed in 0.233575 second(s), 28 queries .

    Powered by Discuz! X3.4

    © 2001-2017 Comsenz Inc.

    返回顶部