Spinner: text vs value

by droidin.net » Wed, 05 Aug 2009 03:12:19 GMT


Sponsored Links
 I declare my Spinner in the following manner (it's very static so I
have 2 string arrays in array.xml for titles and values)

<Spinner android:id="@+id/searchCriteria" android:entries="@array/
searchBy" android:entryValues="@array/searchByValues">
</Spinner>

I expect spinner.getSelectedItem() to return an array [title, value]
but in fact it returns just a title String. Is it ignoring
android:entryValues? How do I get a value, not a title from it? Is
this doable with XML only or do I need to create adapter and do it
programmatically?

Thanks,

Bo
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Debugable Binary

Hi All,

I am working on webkit native library. I want to know how to make it
debugable (includeing the debug symbols using -g in Cflags).
Kindly give me the ways to make is debugable.I think i have to make
changes in Android.mk.By including the LOCAL_C_FLAGS = -g

Correct me if i am wrong.
Regards
Yogendra

-- 

2. Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE

Hi,
I am working with android2.2 and I have large no.of Image files and
total size of those files more than 30 MB and I have stored them in
asset folder, while Im trying to run the emulator,it shows the "
Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE"  in console
and It does not show any thing regarding my application even launcher
icon also..
how shall we put all the 30 MB data in android project?

--

3. how to reload previous activity on back button click

4. BubbleTextView.java from launcher package

5. Wrong widthPixels?

6. Kristen schaal

7. Confused by @Override