This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ExpandableListAdapter adapter = expandableListView.getExpandableListAdapter(); | |
int groupCount = adapter.getGroupCount(); | |
for(int i=0; i < groupCount; i++) { | |
int childCount = adapter.getChildrenCount(i); | |
View groupView = adapter.getGroupView(i, false, null, expandableListView); | |
CheckBox cbGroupSelected = (CheckBox) groupView.findViewById(R.id.cb_group_selected); | |
cbGroupSelected.setOnCheckedChangeListener(this); | |
for(int j=0; j < childCount; j++) { | |
View childView = adapter.getChildView(i, j, false, null, expandableListView); | |
CheckBox cbChildSelected = (CheckBox) childView.findViewById(R.id.cb_child_selected); | |
cbChildSelected.setOnCheckedChangeListener(this); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment