Progress Dialog is not displaying while getting data from separate thread class

后端 未结 2 1040
你的背包
你的背包 2021-01-21 10:05

I am using separate thread to get the json object from the url. but the problem is I would like to show the progress dialog while getting the result. I have create a progress di

2条回答
  •  醉梦人生
    2021-01-21 10:33

    Instead of you creating and handling a separate thread by yourself, use Asynctask. It will make your job easier. You can have a progress dialog displayed through out the execution of this async task and you can update the progress dialog from asynctask using publishProgress()

提交回复
热议问题