for (Iterator i = keys.iterator(); i.hasNext()
{
String key = (String) i.next();
String value = (String) map.get(key);
text+=key + " = " + value;
}
或者
or (Map.Entry entry : map.entrySet()) {
String key = entry.getKey();
String value = entry.getValue();
// do stuff
} Iterator> iterator = map.entrySet().iterator();
Entry< String, String> entry;
while(iterator.hasNext()){
entry = iterator.next();
Log.d("Key Value",entry.getKey()+" "+entry.getValue());
}