http://code.google.com/android/samples/ApiDemos/src/com/example/android/apis/view/Spinner1.html
Just use the simplecursor adapter instead of the ArrayAdapter..
For eg for the contacts:
Cursor c = getContentResolver().query(
android.provider.Contacts.Phones.CONTENT_URI, null, null,
null,
null);
startManagingCursor(c);
SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,
android.R.layout.simple_spinner_item, c,
new String[] { Phones.NAME }, new int[] { android.R.id.text1
});
adapter
.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
contactsSpinner.setAdapter(adapter);
On Wed, Dec 17, 2008 at 2:05 AM, Akili King <[email protected]> wrote:
> Does anyone have a good example of loading a spinner from a specific
> column in a sqlite db table. I think I'm missing something.
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---