To use ProgressDialog till GridView gets loaded from webservice

后端 未结 4 1176
被撕碎了的回忆
被撕碎了的回忆 2021-01-17 05:51

I am fetching Image and Text for GridView from a webservice, so its takes some time to display the GridView. I want to show a ProgressDialog till Grid gets fully loaded. Wha

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-17 06:18

    Try to put all rendering part from server in doInBackground() and set the adapter in onPostExecute() . And even start the progressdialog in onPreExecute() in and dismiss it on onPostExecute() but not in onCreate(). I think it will solve ur problem....

提交回复
热议问题