• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps List<Map<String, Object>> problem

yysiow

Lurker
My XML file have 11 record, when i use List<Map<String, Object>> to add the data, the last record become first record.why?? any one can help..

below i give some example..
============================
Map<String, Object> item;

final List<Map<String, Object>> data = new ArrayList<Map<String, Object>>();

for(int subicount = 0; subicount < subgroupList.getLength(); subicount++){ //subgroupList.getLength() is 11.
item = new HashMap<String, Object>();
item.put(ITEM_ICON, bitmap);
item.put(ITEM_TEXT, ((Node) subname.item(0)).getNodeValue());
data.add(item);
}

==============================
date is "A,B,C,D,E,F,G,H,I,J,K".

but in the listview result is

result is "A,B,C,D,E,F,G,H,I,J,A".

I can sure when i do the loop, the last record is K. but put in list view become A,

any ideal on it. please help. thanks.

yys
 
Back
Top Bottom