Parse JSON data into Android ListView

前端 未结 2 1883
遥遥无期
遥遥无期 2021-01-28 04:51

I\'ve been lurking this site for quite some time now, fortunately until now all my questions have been answered. I was hoping some of you could shed some light on my problem he

相关标签:
2条回答
  • 2021-01-28 05:02

    This code is wrong on so many levels starting with disregard of Java conventions and completely swallowed Exception handling.

    I would strongly advise on executing any sort of remote calls in the main thread of your app. You need to wrap it at least into AsyncTask (or possibly Service) and populate your ListView using a callback to make sure that you are back to the main UI thread

    0 讨论(0)
  • 2021-01-28 05:14

    you can use a open API Gson.jar to fetch the data from Json.. It fetch data in standarized manner... try it for example... http://blog.foos-bar.com/2010/08/parsing-facebook-json.html

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