It's native behavior of ExpandableListView
so if any Item doesn't have children, implicitly won't be expanded but you need to set OnClickListener
for both groups (Items) and children (Options):
public boolean onChildClick(ExpandableListView parent, View row,
int groupPosition, int childPosition, long id) {
// callback method after click for Options
return false;
}
public boolean onGroupClick(ExpandableListView parent, View row,
int groupPosition, long id) {
/** if you are using BaseAdapter subclass implementation **/
if(adapter.getGroup(groupPosition).getChildren() == null) {
// item doesn't have children
return true;
}
else {
// has children
return false;
}
}