Parse JSON data into Android ListView

前端 未结 2 1909
遥遥无期
遥遥无期 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

提交回复
热议问题