I\'m looking for an api like isExpanded() or isCollapsed() that tell me if a group is expanded or collapsed.
There is a parameter in getGroupView()
on your ExpandableListAdapter
, a boolean that represents wheter the group is expanded or not.
From (http://developer.android.com/reference/android/widget/ExpandableListAdapter.html#getGroupView(int, boolean, android.view.View, android.view.ViewGroup)
Gets a View that displays the given group. This View is only for the group--the Views for the group's children will be fetched using getChildView(int, int, boolean, View, ViewGroup)).
Parameters
groupPosition the position of the group for which the View is returned
isExpanded whether the group is expanded or collapsed
convertView the old view to reuse, if possible. You should check that this view is non-null and of an appropriate type before using. If it is not possible to convert this view to display the correct data, this method can create a new view. It is not guaranteed that the convertView will have been previously created by getGroupView(int, boolean, View, ViewGroup). parent the parent that this view will eventually be attached to