实现购物车

expan = (ExpandableListView) findViewById(R.id.expand);
quan = (CheckBox) findViewById(R.id.quan);
he = (TextView) findViewById(R.id.he);
jie = (TextView) findViewById(R.id.jie);

group = new ArrayList();
child = new ArrayList>();

for (int i = 0; i< 2; i++){

    group.add(new GroupBean("商铺",false));
    List chilDb = new ArrayList<>();
    for (int j = 0; j< 2; j++){

        chilDb.add(new ChildBean("商品","100","http://avatar.csdn.net/E/B/A/1_liu461211527.jpg ",false,1));
    }
    child.add(chilDb);
}
CartUtils.setCartData(this,group,child, expan,quan,he,jie);

你可能感兴趣的:(实现购物车)