Sonntag, 5. Juni 2011

Changing a Spinner to a ListView

For tablets I wanted to use a ListView instead of a Spinner in OI Shopping List.
  1. Change the activity layout.xml
  2. Use an appropriate layout for the items (defined in the adapter)
  3. Change class of the widget to AdapterView, don't cast to anything else
  4. Check use getSelectedItem* and use different methods to store selected item, ListView do not handle selections, but checked items ( with activated theme/background)

Keine Kommentare:

Kommentar veröffentlichen