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

View File

@@ -153,7 +153,6 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
protected int mTouchState = TOUCH_STATE_REST;
protected boolean mForceScreenScrolled = false;
private boolean mScrollAbortedFromIntercept = false;
protected OnLongClickListener mLongClickListener;
@@ -1395,13 +1394,13 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
* being flinged.
*/
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) {
mTouchState = TOUCH_STATE_REST;
if (!mScroller.isFinished()) {
mScrollAbortedFromIntercept = true;
abortScrollerAnimation(false);
setCurrentPage(getNextPage());
pageEndMoving();
}
} else {
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_CANCEL:
if (mScrollAbortedFromIntercept) {
snapToDestination();
}
resetTouchState();
break;
@@ -2000,7 +1996,6 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
releaseVelocityTracker();
endReordering();
mCancelTap = false;
mScrollAbortedFromIntercept = false;
mTouchState = TOUCH_STATE_REST;
mActivePointerId = INVALID_POINTER;
}

View File

@@ -2114,7 +2114,6 @@ public class Workspace extends SmoothPagedView
enableFreeScroll();
}
if (state != State.NORMAL) {
if (stateIsSpringLoaded) {
mNewScale = mSpringLoadedShrinkFactor;