How to get index of first / last visible group in ExpandableListView?
getFirstVisiblePosition () and getLastVisiblePosition () are in most cases useless for ExpandableListViews, because they return the index of the first / last visible cell in the list. This matters because extended groups count as multiple cells.
I need either some methods, such as getFirstVisibleGroupIndex (), getLastVisibleGroupIndex (), or some method for converting the index value of visible cells from the above methods into the index value of a real group (+ child).
Note. OnScrollListener.onScroll (..., int firstVisibleItem, int visibleItemCount, ...) suffers from the same problem if the listener is set to ExpandableListView.
android
Andreas Schildbach
source share