I have an ExpandableListView of items and on list item I have TextView with two buttons to increment or decrements the value in TextView on clicks. The problem occurs every
Try this adapter:
public class ExpandableListAdapter extends BaseExpandableListAdapter {
class ViewHolder {
TextView childText;
TextView counterText;
Button addItemButton;
Button deleteItemButton;
}
class ChildItem{
String name;
int quantity;
ChildItem(String name, int quantity){
this.name = name;
this.quantity = quantity;
}
}
class Pos{
int group;
int child;
Pos(int group, int child){
this.group = group;
this.child = child;
}
}
private Context context;
private List listDataHeader;
//private HashMap> listHashMap;
private HashMap> listChildMap;
public ExpandableListAdapter(Context context, List listDataHeader, HashMap> listHashMap) {
this.context = context;
this.listDataHeader = listDataHeader;
listChildMap = new HashMap<>();
for(int i=0; i listTemp = new ArrayList<>();
for(int j=0; j