且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

安卓:进度对话框中的AsyncTask没有显示出来

更新时间:2023-01-23 21:11:29

问题的部分原因是由于固定从迈克再经过大约传递一个普通的旧环境的注释。

Part of the problem was fixed thanks to the comment from Mike Repass about passing a plain old context.

至于对话框显示不出来...我只是愚蠢,因为我叫获得()后执行外的AsyncTask的哪些块UI线程。显然,对话框不会显示出来的方式。

As for the dialog not showing up...I was just being stupid because I called a .get() after the execute OUTSIDE the AsyncTask which blocks the UI thread. Obviously the dialog is not going to show up that way.