Hello,
i want to build a list view that shows all the contacts and their
phone numbers. I have this working but I don't like the following. If
a user has one contact that holds multiple phone number ( home, work
etc) the cursor I receive will list every phone number with each
duplicate name.
I am aiming for a representation of the phone numbers like this:
______
Name contact
home:xxx-xx-xxxx
work:xxx-xx-xxx
etc..
_____
Name contact
home:xxx-xxx
______
Name contact
etc...
What is the easiest/best/most efficient way to achieve this. I geuss I
would have to make custom row layout for a the listview, and then keep
in mind that there can be more labels.
The big thing I am really not sure on how to do is, how to create the
underlayin data structure. Does android already provide a way of
getting the data layed-out for me as described?
My code to get the contact is as follows:
<code>
Cursor contactsCursor =
this.managedQuery( android.provider.Contacts.Phones.CONTENT_URI, null,
null, null,null);
this.setListAdapter(new MyContactsAdapter(this, contactsCursor));
</code>
MyContactsAdapter is simply used to fill the fields in my custom row
layout xml
Thank you for your help.
Jiri
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
To unsubscribe from this group, send email to
android-developers+unsubscribegooglegroups.com or reply to this email with the
words "REMOVE ME" as the subject.