Sunday, January 8, 2012

[android-developers] Re: Spinners - Saving and Retrieving selection information to DB

Actually it's easier than I thought. ArrayAdapter takes an array of
objects so I can create a simple object that holds the displayable
string and the associated value, the tostring() on it will return the
displayable string, the getValue() returns the associated value. I
then code a simple method that takes an array of the displayable
strings, an array of the values and then returns an array of the
objects just described. I create the ArrayAdaptor with this array of
objects and jobs a good-un.

Job done :)

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment