开发者

Json Android problem

开发者 https://www.devze.com 2023-03-15 09:21 出处:网络
I am tring to get news from json. Averything works clear but the ques开发者_Python百科tion is, my listview work so slow and force close or wait buttons appears. Is it because it dynamicly gets the inf

I am tring to get news from json. Averything works clear but the ques开发者_Python百科tion is, my listview work so slow and force close or wait buttons appears. Is it because it dynamicly gets the information. How should i get the informations in a array and get the news from there. I only want to refresh when refresh button is clicked?


Move data loading to the separate thread(not UI one) and execute some callback when loading completes(to actually update your listview)


Try using the async task for any data transfer over the network.See the detail below:

http://developer.android.com/reference/android/os/AsyncTask.html

Hope this helps!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号