Fixes to touch handling in all apps pull up work

b/28917826
- Fast scroll bar works even when it's at the top of the recycler view
- Pull down only happens ONLY IF the thumb of the scroll bar is at top
- When container is touched during sliding down animation,
translation should not jump

Change-Id: Ic1d9a4aa77332cc0a7582556f893053003224dd3
This commit is contained in:
Hyunyoung Song
2016-06-10 12:00:02 -07:00
parent a92e0dfa0c
commit f4cbb1428a
4 changed files with 58 additions and 34 deletions

View File

@@ -27,7 +27,6 @@ import android.graphics.Path;
import android.graphics.Point;
import android.graphics.Rect;
import android.view.MotionEvent;
import android.view.VelocityTracker;
import android.view.ViewConfiguration;
import com.android.launcher3.util.Thunk;
@@ -293,7 +292,7 @@ public class BaseRecyclerViewFastScrollBar {
/**
* Returns whether the specified points are near the scroll bar bounds.
*/
private boolean isNearThumb(int x, int y) {
public boolean isNearThumb(int x, int y) {
mTmpRect.set(mThumbOffset.x, mThumbOffset.y, mThumbOffset.x + mThumbWidth,
mThumbOffset.y + mThumbHeight);
mTmpRect.inset(mTouchInset, mTouchInset);