0

Currently, I have a full working app that displays the json data in the listview with default ListAdapter, however, I want to add a imageview and set the string data from the json data via web.

the data I get from the web is like {name=John, title=my book, date_=2014/03/14}. How can I set or make a custom adapter for to display json from arrList = new ArrayList<HashMap<String, String>>(); and also shows Images for the first 3 items ? Since, I'm quite new to this , I would need some help .

if(!arrList.isEmpty()){

                    ListAdapter adapter = new SimpleAdapter(JKujiListActivity.this, arrList,
                            R.layout.customlist, new String[] {"name", "title", "date"},
                            new int[] {R.id.name,R.id.dai, R.id.day});

                    mySpinner.setAdapter(adapter);

                }
Jennifer
  • 1,822
  • 2
  • 20
  • 45

1 Answers1

1

You can't do that with standart adapters. You should create your own adapter class as it explains here.

Community
  • 1
  • 1
Ircover
  • 2,406
  • 2
  • 22
  • 42