diff options
| author | Selim Cinek <cinek@google.com> | 2015-05-21 16:14:45 -0700 |
|---|---|---|
| committer | Selim Cinek <cinek@google.com> | 2015-05-21 23:38:30 +0000 |
| commit | 79d79c455beecf7a70460575ab21d9bf49767e2c (patch) | |
| tree | 4cae0022f455f67321c118170a436c5d95a584ba /packages/SystemUI/src/com/android/systemui/statusbar/stack | |
| parent | ffa6eb8791b65d3959682ee187124c1a06d28884 (diff) | |
| download | frameworks_base-79d79c455beecf7a70460575ab21d9bf49767e2c.zip frameworks_base-79d79c455beecf7a70460575ab21d9bf49767e2c.tar.gz frameworks_base-79d79c455beecf7a70460575ab21d9bf49767e2c.tar.bz2 | |
The heads up now have a margin on top and don't stick to the edge
Bug: 21337754
Change-Id: I199bc0732df62eadc2458db12a7c1059da988020
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/statusbar/stack')
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java | 6 |
1 files changed, 5 insertions, 1 deletions
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 @@ public class StackScrollAlgorithm { 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 @@ public class StackScrollAlgorithm { .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 @@ public class StackScrollAlgorithm { 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 |
