I want to populate a list view with an array list. The array list is fetched from a soap web service response.
I have used it as following:
mylistview = (ListView)findViewById(R.id.list);
listAdapter = new ArrayAdapter<Plant>(MainActivity.this,
android.R.layout.simple_list_item_1, array_books);
mylistview.setAdapter(listAdapter);
It display following in list view:
Book{id=1; name= C++; imagepath=https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GW3ixVIGHLrrXb2yN_6i;}
Book{id=2; name= Java; imagepath=https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GW3ixVyN_6i;}
Book{id=3; name=Android; imagepath=https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GW3HLrrXb2yN_6i;}
I want to display the image by retrieving it from its path in Image View and display only name of book like: image ................ Java
When I change the layout in
listAdapter = new ArrayAdapter<Book>(MainActivity.this,
android.R.layout.row, array_books);
it gives error that row cannot resolved as a resource. But row.xml is present in the layout folder. How can I correct this error and display the items I want in the list view?