float absYDiff = Math.abs(yDiff);
if (orientation == LinearLayout.HORIZONTAL && absXDiff > absYDiff) {
moveX(xDiff);
} else if (orientation == LinearLayout.VERTICAL && absYDiff > absXDiff) {
moveY(yDiff);
<BUG>}
lastPoint.set(event.getX(), event.getY());</BUG>
break;
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_CANCEL:

float absYDiff = Math.abs(yDiff);
if (orientation == LinearLayout.HORIZONTAL && absXDiff > absYDiff) {
moveX(xDiff);
} else if (orientation == LinearLayout.VERTICAL && absYDiff > absXDiff) {
moveY(yDiff);
}
}
lastPoint.set(event.getX(), event.getY());
break;
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_CANCEL:
