How to iterate over ExpandableListView children?

567 Views Asked by At

I need to iterate through ExpandableListView children on childClick and change childView. How can I do that? After changing childView should I notify adapter?

    // Adapter
    FinancesExpListViewAdapter adapter = new FinancesExpListViewAdapter(getApplicationContext(), groups, moneyAdapter);

    // ExpandableListView
    listView.setAdapter(adapter);

    listView.setOnChildClickListener(new ExpandableListView.OnChildClickListener() {
        @Override
        public boolean onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id) {

                for(int i = 0; i < adapter.getGroupCount();i++) {

                    for(int k = 0; k < adapter.getChildrenCount(i); k++) {
                     //to do here
                }
            }
            return false;
        }
    });
0

There are 0 best solutions below