Android Simple Adapter Display In A Listview
here is what I have. public class Contact { private String firstName; private String lastName; private String mobileNumber; private String homeNumber; private
Solution 1:
Override toString()
method in the Contact
class so as it would return a concatination of firstName
and lastName
.
Solution 2:
You can create your own Adapter by extending BaseAdapter. Then in your custom Adapter override the getView() method. In this method you can access various fields of Contacts class, and set accordingly. Please google for ListView custom adapter
Post a Comment for "Android Simple Adapter Display In A Listview"