I guess my situation should be quite common and it should have a simple solution (of which I'm not aware). Indeed, I want to use a TreeMap<String, ArrayList<String>>
in my Adapter
to show the countries in a ListView
. I have created this list (shown in the following picture) without using ListView
but it is quite inefficient.
My question:
Does ListView
suit this task?
yes: How should I define the adapter?
No: What else can I use which is as efficient as the ListView
?
BTW, my TreeMap is like This: ("C", {"Country1","Country2",...})
As you can see in the above image I want to use different dividers (the logic is obvious).