Is it possible to use a hashmap in ArrayAdapter instanciation ?
my "regions" hashmap handles custom ID as keys : Hashmap<ID,Value>
.
vRegions.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, regions));
the problem here is that ArrayAdapter
will call my hashmap's toString()
which will print value
and discard ID
!
I want to be able to use that ID , is there any way to set it as simple_list_item_1
's ID
so i can retreive it later inside onclick event?