In keeping with what I've posted as a comment, here is a simple adapter that will accept a Map and display the keys of the map as the values of the list. I've not tested it in accordance with the actual item id's, but for displaying a map that will be mutated, it seems to work (i.e. if the map itself is changed and notifyDataSetChanged() is called, it will work). I've counted on ArrayAdapter to do the heavy lifting and just overrode the methods I wanted.
The obvious downside is I'm not sure how expensive it is to call keySet().toArray() but I imagine it's a linear time operation, beyond the extra memory usage. But basically I don't know a great way to get around this issue, as it relies on taking a Set into some sort of ordered collection.
public class MapAdapter<K, V> extends ArrayAdapter<K> {
private Map<K, V> items;
public MapAdapter(Context context, int resource, Map<K,V> items) {
super(context, resource);
this.items = items;
}
@Override
public int getCount() {
return items.size();
}
@Override
public K getItem(int position) {
return ((K []) items.keySet().toArray())[position];
}
}