/** * {@link #cancel()}, but also abort all motion in progress and snap to the end of any * animation. */ public void abort() { cancel(); if (mDragState == STATE_SETTLING) { final int oldX = mScroller.getCurrX(); final int oldY = mScroller.getCurrY(); mScroller.abortAnimation(); final int newX = mScroller.getCurrX(); final int newY = mScroller.getCurrY(); mCallback.onViewPositionChanged(mCapturedView, newX, newY, newX - oldX, newY - oldY); } setDragState(STATE_IDLE); }
mDragHelper.cancel(); ev.setAction(MotionEvent.ACTION_DOWN);
mDragHelper.cancel(); mIsUnableToDrag = true; return false;
/** * {@link #cancel()}, but also abort all motion in progress and snap to the end of any * animation. */ public void abort() { cancel(); if (mDragState == STATE_SETTLING) { final int oldX = mScroller.getCurrX(); final int oldY = mScroller.getCurrY(); mScroller.abortAnimation(); final int newX = mScroller.getCurrX(); final int newY = mScroller.getCurrY(); mCallback.onViewPositionChanged(mCapturedView, newX, newY, newX - oldX, newY - oldY); } setDragState(STATE_IDLE); }
/** * {@link #cancel()}, but also abort all motion in progress and snap to the end of any * animation. */ public void abort() { cancel(); if (mDragState == STATE_SETTLING) { final int oldX = mScroller.getCurrX(); final int oldY = mScroller.getCurrY(); mScroller.abortAnimation(); final int newX = mScroller.getCurrX(); final int newY = mScroller.getCurrY(); mCallback.onViewPositionChanged(mCapturedView, newX, newY, newX - oldX, newY - oldY); } setDragState(STATE_IDLE); }
mDragHelper.cancel(); ev.setAction(MotionEvent.ACTION_DOWN);
mDragHelper.cancel(); ev.setAction(MotionEvent.ACTION_DOWN);