I have an ArrayList object like this:
ArrayList<HashMap<String, String>> data = new ArrayList<HashMap<String, String>>();
How to iterate through the list? I want to display the value in a TextView which comes from the data of ArrayList object.
I have an ArrayList object like this:
ArrayList<HashMap<String, String>> data = new ArrayList<HashMap<String, String>>();
How to iterate through the list? I want to display the value in a TextView which comes from the data of ArrayList object.
Simplest is to iterate over all the
HashMap
s in theArrayList
and then iterate over all the keys in theMap
:for(HashMap<String, String> map : data){ ... deal with map... }