Google Maps v2 lag after popping their fragment back from stack

后端 未结 3 1653
挽巷
挽巷 2021-01-05 04:07

I have an Activity with a MapFragment that I add to the Activity programmatically using a FragmentTransaction:

         


        
3条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-05 04:41

    I have fixed it by dismissing the ProgressDialog already at the end of the AsyncTask's doInBackground() method rather than at the beginning of the onPostExecute() method.

    Which is a bit weird because I actually thought I shouldn't touch things from the UI in the doInBackground() method... If someone wants to elaborate on it a bit, I would be glad to learn why it works like this.

提交回复
热议问题