ProgressDialog not shown in UIThread

╄→гoц情女王★ 提交于 2019-12-02 13:41:44

It is pointless to put up a ProgressDialog for a MapActivity because "the mapwidget takes a long time to load", because you have no way to know when the MapView is done loading, so you have no way to know when to dismiss the dialog. setContentView() itself should run fairly quickly; the actual loading of the map tiles happens asynchronously.

Note that the time it takes to display a MapView is mostly dependent upon the Internet connection back to the Google Maps servers. In most cases, it does not take particularly long, certainly not long enough to warrant a ProgressDialog.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!