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

Commit b2b02b9b authored by Adam Cohen's avatar Adam Cohen
Browse files

Fix a small UI nit with screen reordering

-> When in overview mode, flinging the pages can leave the scroller
   running (invisibly) for much additional time, since the scroller
   fling bounds far exceed the alloawble scroll bounds (in order to
   achieve a hard wall type effect)
-> When this is happening, user couldn't pick up a page for reordering
-> Ended the scroller early in this case to avoid the problem

Change-Id: I8b6f140d9a87bb742e57625e90ca7d76a2158e28
parent 2d0fc8dc
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -567,6 +567,13 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
    public void scrollTo(int x, int y) {
    public void scrollTo(int x, int y) {
        // In free scroll mode, we clamp the scrollX
        // In free scroll mode, we clamp the scrollX
        if (mFreeScroll) {
        if (mFreeScroll) {
            // If the scroller is trying to move to a location beyond the maximum allowed
            // in the free scroll mode, we make sure to end the scroll operation.
            if (!mScroller.isFinished() &&
                    (x > mFreeScrollMaxScrollX || x < mFreeScrollMinScrollX)) {
                forceFinishScroller();
            }

            x = Math.min(x, mFreeScrollMaxScrollX);
            x = Math.min(x, mFreeScrollMaxScrollX);
            x = Math.max(x, mFreeScrollMinScrollX);
            x = Math.max(x, mFreeScrollMinScrollX);
        }
        }