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

Commit 4581cf82 authored by Selim Cinek's avatar Selim Cinek
Browse files

Fixed a jump in the stack scroller algorithm

The bottom stack jumped slightly when scrolling in landscape.

Bug: 16954513
Change-Id: I11ed9074cf5286b01f4f57ce37b4476c2ee9cd7e
parent e5910f70
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -385,11 +385,14 @@ public class StackScrollAlgorithm {

                // check if we are overlapping with the bottom stack
                if (childViewState.yTranslation + childHeight + mPaddingBetweenElements
                        >= bottomStackStart && !mIsExpansionChanging && i != 0) {
                        >= bottomStackStart && !mIsExpansionChanging && i != 0 && mIsSmallScreen) {
                    // we just collapse this element slightly
                    int newSize = (int) Math.max(bottomStackStart - mPaddingBetweenElements -
                            childViewState.yTranslation, mCollapsedSize);
                    childViewState.height = newSize;
                    updateStateForChildTransitioningInBottom(algorithmState, bottomStackStart,
                            bottomPeekStart, childViewState.yTranslation, childViewState,
                            childHeight);
                }
                clampPositionToBottomStackStart(childViewState, childViewState.height);
            } else if (nextYPosition >= bottomStackStart) {