Is it possible to use a hash map in initializing an ArrayAdapter?
hashmap my "regions" handles user ID as keys: Hashmap<ID,Value>.
vRegions.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, regions));
the problem here is what ArrayAdaptermy hashmap will call toString(), which will print valueand drop ID!
I want to be able to use this identifier, is there a way to set it as simple_list_item_1 IDso that I can recover it later inside the onclick event?
source
share