Skip to content

Commit 4581cf8

Browse files
author
Selim Cinek
committed
Fixed a jump in the stack scroller algorithm
The bottom stack jumped slightly when scrolling in landscape. Bug: 16954513 Change-Id: I11ed9074cf5286b01f4f57ce37b4476c2ee9cd7e
1 parent e5910f7 commit 4581cf8

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,11 +385,14 @@ private void updatePositionsForState(StackScrollState resultState,
385385

386386
// check if we are overlapping with the bottom stack
387387
if (childViewState.yTranslation + childHeight + mPaddingBetweenElements
388-
>= bottomStackStart && !mIsExpansionChanging && i != 0) {
388+
>= bottomStackStart && !mIsExpansionChanging && i != 0 && mIsSmallScreen) {
389389
// we just collapse this element slightly
390390
int newSize = (int) Math.max(bottomStackStart - mPaddingBetweenElements -
391391
childViewState.yTranslation, mCollapsedSize);
392392
childViewState.height = newSize;
393+
updateStateForChildTransitioningInBottom(algorithmState, bottomStackStart,
394+
bottomPeekStart, childViewState.yTranslation, childViewState,
395+
childHeight);
393396
}
394397
clampPositionToBottomStackStart(childViewState, childViewState.height);
395398
} else if (nextYPosition >= bottomStackStart) {

0 commit comments

Comments
 (0)