I'm trying to put a checkbox into ExpandableListView. How do I do that? I extend BaseExpandableListAdapter and put the following into getGroupView():
@Override
public View getGroupView(int groupPosition, boolean isExpanded, View convertView,
ViewGroup parent) {
View view = convertView == null ?
context.getLayoutInflater().inflate(R.layout.onet_head, null) : convertView;
((TextView)view.findViewById(R.id.onetText)).setText(cats.get(groupPosition).value);
return view;
}
Notice that inflated layout? That's where I'm putting TextView and CheckBox. I noticed that placing a checkbox into my group row layout disables default group row functionality when clicking on the row makes a secondary (child) list appear. CheckBox is functioning as expected but when I click outside of the it the click is never detected by ether CheckBox or by OnGroupClickListener. I suspect that placing CheckBox into group row this way interferes with event detection/handling but thus far I'm not able to track it down
Can someone help me to resolve this? The CheckBox works fine though including detecting clicks when clicking directly on the box