I am working on Activity having ListView & i request an php file from server which returns me one JSONArray having data of all users (e.g, [{“name”:”A”,”ID”:”id”,”img”:”X”},{“”:”” …},{“”:”” …}] ). I get it in one JSONArray in my activity and extract JSONObject from it and from this JSONObject i get all values. An ArrayAdapter< String > works well but i wanted to display it in this way –>
1.an imageView having image of user at the left
2.textView having the name of user
3.textView below name having id of user
How I do this?
Would appreciate your help a lot!
For that you will need to create your own custom adapter for your list.
Create a layout that meets your criteria(which will be the row in your list) and then create your on Custom Adapter extending the BaseAdapter class and inflate your view.