Cancel long press within normal touch slop, before paging touch slop.
Change-Id: I1b4d02db306bc0a7c3f39e2174a7239239ce4422
This commit is contained in:
parent
3499d4aac4
commit
c36f2455ab
|
@ -616,12 +616,14 @@ public class Workspace extends ViewGroup implements DropTarget, DragSource, Drag
|
|||
final int xDiff = (int) Math.abs(x - mLastMotionX);
|
||||
final int yDiff = (int) Math.abs(y - mLastMotionY);
|
||||
|
||||
boolean xMoved = xDiff > mPagingTouchSlop;
|
||||
boolean yMoved = yDiff > mTouchSlop;
|
||||
final int touchSlop = mTouchSlop;
|
||||
boolean xPaged = xDiff > mPagingTouchSlop;
|
||||
boolean xMoved = xDiff > touchSlop;
|
||||
boolean yMoved = yDiff > touchSlop;
|
||||
|
||||
if (xMoved || yMoved) {
|
||||
|
||||
if (xMoved) {
|
||||
if (xPaged) {
|
||||
// Scroll if the user moved far enough along the X axis
|
||||
mTouchState = TOUCH_STATE_SCROLLING;
|
||||
mLastMotionX = x;
|
||||
|
|
Loading…
Reference in New Issue