I want to use HashMap
for a list of items of Adapter
for a ListView
. I was going to use ArrayAdapter<>
but I can\'t
To maintain order in the dictionary, if the key type is applicable, you could always add them to an ArrayList of their own, sort it using Collections.sort, and work with that as your reference point.
private ArrayList mKeys = new ArrayList<>();
for (String aKey :data.keySet()){
mKeys.add(aKey);
}
Collections.sort(mKeys);