I\'m developing android application using expandable list view. Actually what I need is, I\'m listing group, which contains child.
If I select an unexpandable group
Get ExpendableListView
and then override the following method - setOnGroupExpandListener
expandableListView = (ExpandableListView) findViewById(R.id.exp_listview);
expandableListView.setOnGroupExpandListener(new ExpandableListView.OnGroupExpandListener() {
int previousItem = -1;
@Override
public void onGroupExpand(int groupPosition) {
if (groupPosition != previousItem)
expandableListView.collapseGroup(previousItem);
previousItem = groupPosition;
}
});