List<Map<String, Object>> problem


Last Updated:

  1. yysiow

    yysiow New Member This Topic's Starter

    Joined:
    Apr 22, 2010
    Messages:
    2
    Likes Received:
    0
    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
     

    Advertisement

Share This Page

Loading...