Merge "Allowing ability to pick up items / enter overview before full page settle" into jb-ub-now-jolly-elf

This commit is contained in:
Adam Cohen
2013-11-25 18:46:23 +00:00
committed by Android (Google) Code Review
2 changed files with 3 additions and 9 deletions
+3 -8
View File
@@ -153,7 +153,6 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
protected int mTouchState = TOUCH_STATE_REST; protected int mTouchState = TOUCH_STATE_REST;
protected boolean mForceScreenScrolled = false; protected boolean mForceScreenScrolled = false;
private boolean mScrollAbortedFromIntercept = false;
protected OnLongClickListener mLongClickListener; protected OnLongClickListener mLongClickListener;
@@ -1395,13 +1394,13 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
* being flinged. * being flinged.
*/ */
final int xDist = Math.abs(mScroller.getFinalX() - mScroller.getCurrX()); final int xDist = Math.abs(mScroller.getFinalX() - mScroller.getCurrX());
final boolean finishedScrolling = (mScroller.isFinished() || xDist < mTouchSlop); final boolean finishedScrolling = (mScroller.isFinished() || xDist < mTouchSlop / 3);
if (finishedScrolling) { if (finishedScrolling) {
mTouchState = TOUCH_STATE_REST; mTouchState = TOUCH_STATE_REST;
if (!mScroller.isFinished()) { if (!mScroller.isFinished()) {
mScrollAbortedFromIntercept = true; setCurrentPage(getNextPage());
abortScrollerAnimation(false); pageEndMoving();
} }
} else { } else {
if (isTouchPointInViewportWithBuffer((int) mDownMotionX, (int) mDownMotionY)) { if (isTouchPointInViewportWithBuffer((int) mDownMotionX, (int) mDownMotionY)) {
@@ -1429,9 +1428,6 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
case MotionEvent.ACTION_UP: case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_CANCEL: case MotionEvent.ACTION_CANCEL:
if (mScrollAbortedFromIntercept) {
snapToDestination();
}
resetTouchState(); resetTouchState();
break; break;
@@ -2000,7 +1996,6 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
releaseVelocityTracker(); releaseVelocityTracker();
endReordering(); endReordering();
mCancelTap = false; mCancelTap = false;
mScrollAbortedFromIntercept = false;
mTouchState = TOUCH_STATE_REST; mTouchState = TOUCH_STATE_REST;
mActivePointerId = INVALID_POINTER; mActivePointerId = INVALID_POINTER;
} }
-1
View File
@@ -2114,7 +2114,6 @@ public class Workspace extends SmoothPagedView
enableFreeScroll(); enableFreeScroll();
} }
if (state != State.NORMAL) { if (state != State.NORMAL) {
if (stateIsSpringLoaded) { if (stateIsSpringLoaded) {
mNewScale = mSpringLoadedShrinkFactor; mNewScale = mSpringLoadedShrinkFactor;