Android中ProgressDialog的dismiss()与cancel()方法的区别
程序员文章站
2022-06-02 22:10:06
progressdialog, 它有两个方法dialog.cancel() 和 dialog.dimiss()
1. public void 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 ()。
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,同时也希望多多支持!
上一篇: Android图片加载框架Glide的基本用法介绍
下一篇: Oracle常用命令大全
推荐阅读
-
Android中asset文件夹与raw文件夹的区别深入解析
-
android中ProgressDialog与ProgressBar的使用详解
-
Android中传值Intent与Bundle的区别小结
-
Android开发 RadioButton使用中遇到的问题与解决方法
-
解析thinkphp中的M()与D()方法的区别
-
Android中ProgressDialog的dismiss()与cancel()方法的区别
-
Java中成员变量与局部变量的区别、对象类型作为方法的参数和方法的返回值
-
Android中buildToolVersion与CompileSdkVersion的区别
-
Python中append、extend与insert几个方法的区别
-
jq中bind方法与on方法的区别实例分析