summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorSelim Cinek <cinek@google.com>2014-05-30 17:01:21 +0200
committerSelim Cinek <cinek@google.com>2014-05-30 15:32:52 +0000
commita02fe523cc9642a085bd4ae56436b2c0f23fe7a2 (patch)
tree27779a5e21f6cfa69151f49facb9375a20efba7f /packages
parent79525b2f024940c9391e79d52972e0d82450589b (diff)
downloadframeworks_base-a02fe523cc9642a085bd4ae56436b2c0f23fe7a2.zip
frameworks_base-a02fe523cc9642a085bd4ae56436b2c0f23fe7a2.tar.gz
frameworks_base-a02fe523cc9642a085bd4ae56436b2c0f23fe7a2.tar.bz2
Reduced overexpansion when expanding the panel
Bug: 14486987 Change-Id: Ic1546e1661e3afe842b044abf636421d2620bddd
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
index dce5a30..365ee57 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -48,6 +48,8 @@ public class NotificationPanelView extends PanelView implements
ExpandableView.OnHeightChangedListener, ObservableScrollView.Listener,
View.OnClickListener, KeyguardPageSwipeHelper.Callback {
+ private static float EXPANSION_RUBBER_BAND_EXTRA_FACTOR = 0.4f;
+
private KeyguardPageSwipeHelper mPageSwiper;
PhoneStatusBar mStatusBar;
private StatusBarHeaderView mHeader;
@@ -743,8 +745,11 @@ public class NotificationPanelView extends PanelView implements
@Override
protected void onOverExpansionChanged(float overExpansion) {
float currentOverScroll = mNotificationStackScroller.getCurrentOverScrolledPixels(true);
- mNotificationStackScroller.setOverScrolledPixels(currentOverScroll + overExpansion
- - mOverExpansion, true /* onTop */, false /* animate */);
+ float expansionChange = overExpansion - mOverExpansion;
+ expansionChange *= EXPANSION_RUBBER_BAND_EXTRA_FACTOR;
+ mNotificationStackScroller.setOverScrolledPixels(currentOverScroll + expansionChange,
+ true /* onTop */,
+ false /* animate */);
super.onOverExpansionChanged(overExpansion);
}