I'm looking for an api like isExpanded() or isCollapsed() that tell me if a group is expanded or collapsed.
You can use isGroupExpanded
.
expListViewObj.setOnGroupClickListener(new ExpandableListView.OnGroupClickListener() {
@Override
public boolean onGroupClick(ExpandableListView parent, View v,
int groupPosition, long id) {
if(parent.isGroupExpanded(groupPosition))
{
// Do your Staff
}
else{
// Expanded ,Do your Staff
}
return false;
}
});
For more details you can visit Here