软件编程
位置:首页>> 软件编程>> Android编程>> Android中ProgressDialog的dismiss()与cancel()方法的区别

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

作者:qq_20252351  发布时间:2021-07-27 04:14:24 

标签:android,progressdialog

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

0
投稿

猜你喜欢

手机版 软件编程 asp之家 www.aspxhome.com