frizzo wrote:
> Currently I can store an ArrayAdapter in the ListView widget, like so:
> 
>         private ArrayAdapter<String> mAdapter;
>         private ArrayList<String> mPresets = new ArrayList<String>
> ();
> 
>         mAdapter = new ArrayAdapter<String>(this,
> android.R.layout.simple_list_item_1, mPresets);
>         setListAdapter(mAdapter);
> 
> 
> However, I'd like to plop a key/value pair onto it.  Is it possible?
> Like a HashMap for instance? 

You can create your own adapter class (extending BaseAdapter, perhaps),
or convert your HashMap to a MatrixCursor.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android Development Wiki: http://wiki.andmob.org

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

Reply via email to