Customize a listview as:
String[] lastName;
String[] firstName;
int[] ids;
...
public object getItem(int position){
return ids[position];
}
...
Do you understand me? your request is just a piece of cake.

On 5月3日, 上午12时39分, Ramesh Sangili <[email protected]> wrote:
> Team,
>
> I would like to know how to display a List View or SPinner using key and
> value pairs in Android platform. For example take Contacts has id, First
> Name, LastName, i would like to display First Name and Last Name in the list
> view or in the spinner,
>
> id1, lastname1, firstname1
>
> id2, lastname2, firstname2
>
> id3, lastname3, firstname3
>
> Once the user selected any value in the List view or spin list, I need to
> get the key value from the List view or spinner.
>
> How to do it?
>
> Any help or examples is greatly appreciated.
>
> Thanks,
>
> Ramesh
>
> --
> 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 
> athttp://groups.google.com/group/android-developers?hl=en

-- 
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

Reply via email to