大佬教程收集整理的这篇文章主要介绍了android – 为什么从后台线程中解除ProgressDialog时没有抛出异常?,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
因为我们正在尝试从后台线程修改UI.但是当我们在后台线程中忽略该对话框时,不会抛出任何异常.为什么我们在后台线程中关闭对话框时没有抛出异常,因为我们也是后台线程中的modifyng UI.
谢谢
/** * 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 {@link #onStop}. */ public void dismiss() { if (Thread.currentThread() != mUiThread) { mHandler.post(mDismissAction); } else { mDismissAction.run(); } }
以上是大佬教程为你收集整理的android – 为什么从后台线程中解除ProgressDialog时没有抛出异常?全部内容,希望文章能够帮你解决android – 为什么从后台线程中解除ProgressDialog时没有抛出异常?所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。