Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 52b65d39 authored by Gilles Debunne's avatar Gilles Debunne
Browse files

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
parent 5e747dd6
Loading
Loading
Loading
Loading
+4 −3
Original line number Original line Diff line number Diff line
@@ -548,8 +548,9 @@ public class ExpandableListView extends ListView {
                final int groupPos = posMetadata.position.groupPos;
                final int groupPos = posMetadata.position.groupPos;
                final int groupFlatPos = posMetadata.position.flatListPos;
                final int groupFlatPos = posMetadata.position.flatListPos;


                smoothScrollToPosition(groupFlatPos + mAdapter.getChildrenCount(groupPos),
                final int shiftedGroupPosition = groupFlatPos + getHeaderViewsCount(); 
                        groupFlatPos);
                smoothScrollToPosition(shiftedGroupPosition + mAdapter.getChildrenCount(groupPos),
                        shiftedGroupPosition);
            }
            }


            returnValue = true;
            returnValue = true;