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

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



Other Threads

1. How to query the number of rows in a table

Thank you. Here is what i try:

public void getRow(SQLiteDatabase db)  {
                try {

                    db.execSQL("select count(*) from mytable");
                    version = 3;
                } catch (SQLException ex) {

                    Log.e(LOG_TAG, ex.getMessage(), ex);
                } finally {


but how can I get the actual result from the 'execSQL' ?

Thank you.


2. How to support Hardware Overlay ?

I have an arm based platform running android (1.0).
There is a linux c sample application that captures from the camera
and dumps on the screen (i.e. hardware overlay).

Now when I run this application over an android application;
android refreshes the overlay area too.

Trying out different layouts for the overlay didnt help.

How do I avoid this refresh? (how to support hardware overlay)


3. When will the Market comment system change?

4. How to get verbose build output

5. Debugging C++ Applications

6. AbsoluteLayout deprecated ... a simple example to be complaint with 1.5 SDK ?

7. Reg: Camera Porting