Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ExpListView.setOnChildClickListener(new OnChildClickListener() {
- @Override
- public boolean onChildClick(ExpandableListView parent, View v,
- int groupPosition, int childPosition, long id) {
- MyListAdapter adapter = (MyListAdapter) parent
- .getExpandableListAdapter();
- for (int i = 0; i < adapter.getChildrenCount(groupPosition); i++) {
- View view2 = (View) adapter.getChildView(groupPosition, i,
- false, v, parent);
- CheckBox cb2 = (CheckBox) view2.findViewById(R.id.checkbox);
- cb2.setChecked(false);
- }
- parent.invalidateViews(); // Update the list view
- CheckBox cb = (CheckBox) v.findViewById(R.id.checkbox);
- cb.setChecked(true);
- return false;
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement