JSON object to listView

14,514

Solution 1

Look at these two tutorials, In these Json object are displayed in Custom ListView, I think this is what you needed,

Android Putting Custom Objects in ListView

Populate Listview from JSON

Solution 2

For simple example no need of custom list view. you can work with simple list view.

  • Parse the JSON data retrieve the data
  • store them in a list and pass that list as an argument to the adapter
  • set the adapter to the list view.
Share:
14,514
ashutosh
Author by

ashutosh

Updated on June 04, 2022

Comments

  • ashutosh
    ashutosh almost 2 years

    i am newbie to android, I wanted to implement dynamically JSON data to my android listView, I have only to objects in JSON file this are dealname and discount.

    I checked all questions and tutorials but when i implemented those codes in application, neither one is running. I just wanted to ask, to implement such JSON data, should i need to parse data and convert into String array so simple listview work, or i need to implement custom listview? Plz your suggestions will help to solve this assignment..

    Thanks in advance.

  • ashutosh
    ashutosh over 12 years
    Frankenstein and user370305 thanks for ur suggestions... It will help me alot.. Thank u very much...
  • theblang
    theblang over 10 years
    Second link is expired.
  • hichris123
    hichris123 about 10 years
    While this answer may theoretically answer the question, it is better to include the essential parts of the answer here, and provide the link for reference.