progressDialog,它有两个方法dialog.cancel() 和 dialog.dimiss()
1. public voID cancel ()
Since: API Level 1Cancel 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 1dismiss 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中ProgressDialog的dismiss()与cancel()方法的区别全部内容,希望文章能够帮你解决Android中ProgressDialog的dismiss()与cancel()方法的区别所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)