views:

312

answers:

2
A: 

expListAdapter.notifyDataSetChanged(); - to notify adapter that data has changed :

For onclick :

OnChildClickListener myOnChildClick = new OnChildClickListener() {

        @Override
        public boolean onChildClick(ExpandableListView arg0, View arg1, int arg2, int arg3,
                long arg4) {
            // TODO Auto-generated method stub
            return false;
        }

    };

and setOnChildClickListener(myOnChildClick); in onCreate

Alex Volovoy
I've tried expListAdapter.notifyDataSetChanged(), but nothing changed in my case. I've just read to use variable instead of using method createChildList() during creating ListAdapter... will try ...BTW, is it necessary to use onChildClick such way? As my activity extends ExpandableListActivity, I'm able to override this method ...
davs
just overriding method is fine.
Alex Volovoy
A: 

To update cells for expanableListView you should use List<ArrayList<HashMap<Object, Object>>> variable during creating adapter. It doesn't work for me first time, because I use internal method, which created new list. Maybe this fact is the cause of problem. As Alex said, you need call adapter.notifyDataSetChanged() to make the changes applied to the ExpandableList. Thanks

davs