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

Commit 7fd28847 authored by Adam Powell's avatar Adam Powell
Browse files

Don't move the fast scroll thumb with a list on overscroll.

parent 1e84ac51
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -2364,9 +2364,18 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
    public void draw(Canvas canvas) {
        super.draw(canvas);
        if (mFastScroller != null) {
            final int scrollY = mScrollY;
            if (scrollY != 0) {
                // Pin the fast scroll thumb to the top/bottom during overscroll.
                int restoreCount = canvas.save();
                canvas.translate(0, (float) scrollY);
                mFastScroller.draw(canvas);
                canvas.restoreToCount(restoreCount);
            } else {
                mFastScroller.draw(canvas);
            }
        }
    }

    @Override
    public boolean onInterceptTouchEvent(MotionEvent ev) {