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

Commit 1fbd42e5 authored by Steve Kondik's avatar Steve Kondik Committed by Gerrit Code Review
Browse files

Merge "Make sure overscroll isn't applied in views it shouldn't be" into froyo

parents 25eee5c4 34f354cf
Loading
Loading
Loading
Loading
+11 −9
Original line number Original line Diff line number Diff line
@@ -1967,7 +1967,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
        // Check if we have moved far enough that it looks more like a
        // Check if we have moved far enough that it looks more like a
        // scroll than a tap
        // scroll than a tap
        final int distance = Math.abs(deltaY);
        final int distance = Math.abs(deltaY);
        final boolean overscroll = mScrollY != 0;
        final boolean overscroll = mScrollY != 0 && (getOverscrollMode() != OVERSCROLL_NEVER);
        if (overscroll || distance > mTouchSlop) {
        if (overscroll || distance > mTouchSlop) {
            createScrollingCache();
            createScrollingCache();
            mTouchMode = overscroll ? TOUCH_MODE_OVERSCROLL : TOUCH_MODE_SCROLL;
            mTouchMode = overscroll ? TOUCH_MODE_OVERSCROLL : TOUCH_MODE_SCROLL;
@@ -2147,6 +2147,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
                        int motionPosition = findMotionRow(y);
                        int motionPosition = findMotionRow(y);
                        if (motionPosition >= 0) {
                        if (motionPosition >= 0) {
                            final View motionView = getChildAt(motionPosition - mFirstPosition);
                            final View motionView = getChildAt(motionPosition - mFirstPosition);
                            if (getOverscrollMode() != OVERSCROLL_NEVER) {
                                // Apply overscroll
                                // Apply overscroll
                                final int motionViewRealTop = motionView.getTop();
                                final int motionViewRealTop = motionView.getTop();


@@ -2156,6 +2157,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
                                        0, getOverscrollMax(), true);
                                        0, getOverscrollMax(), true);
                                mTouchMode = TOUCH_MODE_OVERSCROLL;
                                mTouchMode = TOUCH_MODE_OVERSCROLL;
                                invalidate();
                                invalidate();
                            }
                            mMotionViewOriginalTop = motionView.getTop();
                            mMotionViewOriginalTop = motionView.getTop();
                        }
                        }
                        mMotionY = y;
                        mMotionY = y;