How do I get the displayed value from a Spinner that is bound to a
Cursor. I created and Populated a Spinner using the following, Now I
can't figure out how to get the selected Item from the list..

        Spinner s1 = (Spinner) findViewById(R.id.client_id);
                String[] cMap = new
String[ClientDataProvider.sClientsSpinnerProjectionMap
                                .size()];
        
ClientDataProvider.sClientsSpinnerProjectionMap.keySet().toArray(cMap);
                Uri uClients = Client.Clients.CONTENT_URI;
                Cursor cur = managedQuery(uClients, cMap, null, null, null);
                SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,
android.R.layout.simple_spinner_dropdown_item, cur, new String[]
{Project.Projects.NAME}, new int[] {android.R.id.text1});
        
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
                s1.setAdapter(adapter);

Where the ProjectionMap looks like this.....

  sClientsSpinnerProjectionMap = new HashMap<String, String>();
        sClientsSpinnerProjectionMap.put(Clients._ID, Clients._ID);
        sClientsSpinnerProjectionMap.put(Clients.NAME, Clients.NAME);

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