I have to implement a ListView with elements from a Person object. This object has various properties:
Name(String), Email(String) and Telephones(Vector(String)). The list needs to report the values of these properties and, depending on the type, show a little image associated. For example if the field is an email address the list must show an image representing an anvelop. My doubt is how to determine the image to associate and how to handle that vector of String. I already have the layout. I need to write the code. Hope someone will help me.
Regards.
As i understood your question, i am sure i got the point that you want to display the Person object description inside the ListView.
so for that you need to define a custom adapter. Create a class and extends BaseAdapter for the same. For defining each items inside a ListView, just create a XML layout file which represent every items inside the ListView.
You have to inflate this XML layout row file inside the getView() method of that custom adapter class.