Fetch data from server and refresh UI when data is fetched?

后端 未结 1 506
不思量自难忘°
不思量自难忘° 2020-12-11 10:37

I want to fetch data from server and refresh UI when data is fetched in Android.

What should I use? an AsyncTask or a Service or something else?

相关标签:
1条回答
  • 2020-12-11 11:27

    You can use the Async task and a method which sets the contentview (layout) of your screen. After the data has been fetched from the server, you can again refresh the screen by calling the method in postexecute() of Asynctask.

    0 讨论(0)
提交回复
热议问题