Fixed a jump in the stack scroller algorithm
The bottom stack jumped slightly when scrolling in landscape.
Bug: 16954513
Change-Id: I11ed9074cf5286b01f4f57ce37b4476c2ee9cd7e
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java
index 79a83db..f984339b3 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java
@@ -385,11 +385,14 @@
// 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) {