Take headers into account when expanding a ExpListView group.
The possible scroll that happen after expanding a group did not take the possible existing headers into account. Change-Id: I5dc381baa7c54580e992e26a1ed55102afcb16b0
This commit is contained in:
@@ -547,9 +547,10 @@ public class ExpandableListView extends ListView {
|
||||
|
||||
final int groupPos = posMetadata.position.groupPos;
|
||||
final int groupFlatPos = posMetadata.position.flatListPos;
|
||||
|
||||
smoothScrollToPosition(groupFlatPos + mAdapter.getChildrenCount(groupPos),
|
||||
groupFlatPos);
|
||||
|
||||
final int shiftedGroupPosition = groupFlatPos + getHeaderViewsCount();
|
||||
smoothScrollToPosition(shiftedGroupPosition + mAdapter.getChildrenCount(groupPos),
|
||||
shiftedGroupPosition);
|
||||
}
|
||||
|
||||
returnValue = true;
|
||||
|
||||
Reference in New Issue
Block a user