summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src
diff options
context:
space:
mode:
authorSelim Cinek <cinek@google.com>2014-05-24 14:53:36 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-05-24 14:53:36 +0000
commita08334e506c94c6cb2b37b8d53c1063acab53d31 (patch)
treea7d87c73d097ff32154602263f6590ec4b676dc0 /packages/SystemUI/src
parenta82c9be2f71c7fdd1aba2cc8ccb3e404886f8561 (diff)
parentf653dba7cb672b5ebfc8403e54e74095a89d56fb (diff)
downloadframeworks_base-a08334e506c94c6cb2b37b8d53c1063acab53d31.zip
frameworks_base-a08334e506c94c6cb2b37b8d53c1063acab53d31.tar.gz
frameworks_base-a08334e506c94c6cb2b37b8d53c1063acab53d31.tar.bz2
Merge "Notifications where clipped incorrectly in the unlocked shade." into lmp-preview-dev
Diffstat (limited to 'packages/SystemUI/src')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollState.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollState.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollState.java
index ae2acab..44e10be 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollState.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollState.java
@@ -37,12 +37,15 @@ public class StackScrollState {
private static final String CHILD_NOT_FOUND_TAG = "StackScrollStateNoSuchChild";
private final ViewGroup mHostView;
+ private final int mRoundedRectCornerRadius;
private Map<ExpandableView, ViewState> mStateMap;
private final Rect mClipRect = new Rect();
public StackScrollState(ViewGroup hostView) {
mHostView = hostView;
mStateMap = new HashMap<ExpandableView, ViewState>();
+ mRoundedRectCornerRadius = mHostView.getResources().getDimensionPixelSize(
+ com.android.internal.R.dimen.notification_quantum_rounded_rect_radius);
}
public ViewGroup getHostView() {
@@ -155,11 +158,15 @@ public class StackScrollState {
// apply clipping and shadow
float newNotificationEnd = newYTranslation + newHeight;
+ // In the unlocked shade we have to clip a little bit higher because of the rounded
+ // corners of the notifications.
+ float clippingCorrection = state.dimmed ? 0 : mRoundedRectCornerRadius;
+
// When the previous notification is swiped, we don't clip the content to the
// bottom of it.
float clipHeight = previousNotificationIsSwiped
? newHeight
- : newNotificationEnd - (previousNotificationEnd);
+ : newNotificationEnd - (previousNotificationEnd - clippingCorrection);
updateChildClippingAndBackground(child, newHeight,
clipHeight,