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

Commit d5bb7ef7 authored by Marco Nelissen's avatar Marco Nelissen Committed by Android (Google) Code Review
Browse files

Merge "Make the fastscroll thumb tell the parent to not intercept touch...

Merge "Make the fastscroll thumb tell the parent to not intercept touch events, to keep the list from moving sideways in a "workspace" environment. Fixes one of the issues listed in bug 2374212"
parents 2c355e26 d43fe078
Loading
Loading
Loading
Loading
+10 −1
Original line number Original line Diff line number Diff line
@@ -428,12 +428,21 @@ class FastScroller {
                if (mListAdapter == null && mList != null) {
                if (mListAdapter == null && mList != null) {
                    getSectionsFromIndexer();
                    getSectionsFromIndexer();
                }
                }
                if (mList != null) {
                    mList.requestDisallowInterceptTouchEvent(true);
                }


                cancelFling();
                cancelFling();
                return true;
                return true;
            }
            }
        } else if (action == MotionEvent.ACTION_UP) {
        } else if (action == MotionEvent.ACTION_UP || action == MotionEvent.ACTION_CANCEL) {
            if (mState == STATE_DRAGGING) {
            if (mState == STATE_DRAGGING) {
                if (mList != null) {
                    // ViewGroup does the right thing already, but there might
                    // be other classes that don't properly reset on touch-up,
                    // so do this explicitly just in case.
                    mList.requestDisallowInterceptTouchEvent(false);
                }
                setState(STATE_VISIBLE);
                setState(STATE_VISIBLE);
                final Handler handler = mHandler;
                final Handler handler = mHandler;
                handler.removeCallbacks(mScrollFade);
                handler.removeCallbacks(mScrollFade);