Such a question: the task is to get data from the server in json {"payload": [{'id': 101, 'name': 'name1'}, {'id': 293, 'name': 'name3'},. ..], "resultCode": "OK"} and stuff them into the ListView so that when you click on an item, go to the next activity, passing it the real id of the record. And I would like to display them without saving on the phone. I just can not understand how to do it correctly. Can someone tell me how to implement such a task correctly?

  • 2
    more correctly - write your adapter, and you send data to SimpleAdapter - empty ArrayList - Gorets
  • Made as follows: ArrayAdapter <String> adapter = new ArrayAdapter <String> (this, R.layout.item_test, values); llTest.setAdapter (adapter); How now in values ​​to place the received values? - s01nyshko

1 answer 1

Articles on the Internet on this topic - the car and truck .

True, I prefer the version with asyncTask .