当前位置: 移动技术网 > IT编程>移动开发>Android > Android中ProgressDialog的dismiss()与cancel()方法的区别

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

2019年07月24日  | 移动技术网IT编程  | 我要评论

来书小说网,闪婚是什么意思,无限之猎人

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

以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,同时也希望多多支持移动技术网!

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网