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

Commit e455850f authored by Michael Kwan's avatar Michael Kwan Committed by android-build-merger
Browse files

Limit translation of bottom panel snapping to not overshoot.

am: b1440bdb

Change-Id: I5e34ac21774e9c781f3f3aef0b0a37fe81e1f747
parents bf1849f7 b1440bdb
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -306,8 +306,9 @@ public class WatchListDecorLayout extends FrameLayout
            if (mListView.getChildCount() > 0) {
                if (mListView.getLastVisiblePosition() >= mListView.getCount() - 1) {
                    View lastChild = mListView.getChildAt(mListView.getChildCount() - 1);
                    setScrolling(mBottomPanel,
                            lastChild.getY() + lastChild.getHeight() - mBottomPanel.getTop());
                    setScrolling(mBottomPanel, Math.max(
                            0,
                            lastChild.getY() + lastChild.getHeight() - mBottomPanel.getTop()));
                } else {
                    // shift to hide the frame, last child is not the last position
                    setScrolling(mBottomPanel, mBottomPanel.getHeight());