diff options
| author | Marco Nelissen <marcone@google.com> | 2010-02-03 10:22:21 -0800 |
|---|---|---|
| committer | Marco Nelissen <marcone@google.com> | 2010-02-03 10:42:33 -0800 |
| commit | d43fe07852a23c78da3b51b45469687c20be919a (patch) | |
| tree | 277455594d803af3785071d2761a9d98b1c85342 | |
| parent | 62f67048c4e085fd97ffc1fea0b10cf000cd5bea (diff) | |
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
| -rw-r--r-- | core/java/android/widget/FastScroller.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/core/java/android/widget/FastScroller.java b/core/java/android/widget/FastScroller.java index 67c0def552e8..13fe5a435e5d 100644 --- a/core/java/android/widget/FastScroller.java +++ b/core/java/android/widget/FastScroller.java @@ -428,12 +428,21 @@ class FastScroller { if (mListAdapter == null && mList != null) { getSectionsFromIndexer(); } + if (mList != null) { + mList.requestDisallowInterceptTouchEvent(true); + } cancelFling(); return true; } - } else if (action == MotionEvent.ACTION_UP) { + } else if (action == MotionEvent.ACTION_UP || action == MotionEvent.ACTION_CANCEL) { 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); final Handler handler = mHandler; handler.removeCallbacks(mScrollFade); |
