ANDROID : how to get value stored in ArrayList<HashMap<key,value>>?
- by Roshni Kyada
I have ArrayList. At another activity i want to access all values stored in ArrayList.
I tried following code.
ArrayList<HashMap<String, String>> mylist = new ArrayList<HashMap<String, String>>();
for(Hashmap<String, String> map: mylist) {
for(Entry<String, String> mapEntry: map) {
String key = mapEntry.getKey();
String value = mapEntry.getValue();
}
}
but it shows an error at for(Entry mapEntry: map) that it only interate over Array.