Hello,
I'm trying to create a very simple application that extract data from
SQL database and populate a spinner control with (for example) product
names.
I found the following example of the code:
String[] from = new String[] { "Product_Name" };
int[] to = new int[] { android.R.id.text1 };
SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,
android.R.layout.simple_spinner_item, product_cursor, from, to );
adapter.setDropDownViewResource
(android.R.layout.simple_spinner_dropdown_item);
spinner.setAdapter(adapter);
The only thing I couldn't understand what should I put into "to"
array? The spinner is the only control on the form. I tried to find
the answer, but most of the samples use ListView control and put
"android.R.id.text1" into "to" array
Thanks,
gin_tonic
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---