Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ae9e1a5d authored by Selim Cinek's avatar Selim Cinek Committed by Android Git Automerger
Browse files

am 0eb33b30: Reduced overexpansion when expanding the panel

* commit '0eb33b30202ce7dec036312f2d1a87f5dba0e9a4':
  Reduced overexpansion when expanding the panel
parents 4b44b7ad a02fe523
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -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);
    }