On Tue, Feb 23, 2010 at 8:30 AM, Nick Owens <[email protected]> wrote:

> So, the question is how do I get from "red" to "2"?!  There must be some
> setSelectionByValue() or getSelectionIndex() function, right?
>

Documentation is your friend. Spinner inherits from AdapterView, which has
the getSelectedItemPosition() function.

http://developer.android.com/intl/de/reference/android/widget/AdapterView.html#getSelectedItemPosition()

<http://developer.android.com/intl/de/reference/android/widget/AdapterView.html#getSelectedItemPosition()>Tip:
if you're using Eclipse, when you are using classes that are not your own,
type "s.get" to see a list of all getter functions available to that class.
Run through the list looking at the descriptions to see if any appear to be
what you need.

-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

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