The heads up now have a margin on top and don't stick to the edge
Bug: 21337754
Change-Id: I199bc0732df62eadc2458db12a7c1059da988020
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 081a9c5..5c604b6 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java
@@ -64,6 +64,7 @@
private int mTopStackTotalSize;
private int mPaddingBetweenElementsDimmed;
private int mPaddingBetweenElementsNormal;
+ private int mNotificationsTopPadding;
private int mBottomStackSlowDownLength;
private int mTopStackSlowDownLength;
private int mCollapseSecondCardPadding;
@@ -104,6 +105,8 @@
.getDimensionPixelSize(R.dimen.notification_padding_dimmed);
mPaddingBetweenElementsNormal = context.getResources()
.getDimensionPixelSize(R.dimen.notification_padding);
+ mNotificationsTopPadding = context.getResources()
+ .getDimensionPixelSize(R.dimen.notifications_top_padding);
mCollapsedSize = context.getResources()
.getDimensionPixelSize(R.dimen.notification_min_height);
mMaxNotificationHeight = context.getResources()
@@ -518,7 +521,8 @@
bottomPosition);
}
if (row.isPinned()) {
- childState.yTranslation = Math.max(childState.yTranslation, 0);
+ childState.yTranslation = Math.max(childState.yTranslation,
+ mNotificationsTopPadding);
childState.height = row.getHeadsUpHeight();
if (!isTopEntry) {
// Ensure that a headsUp doesn't vertically extend further than the heads-up at