OVE:
Log.e(test, isIntercept ACTION_MOVE +isLock);
if (!isLock) {
float deltaX = Math.abs(mLastMotionX - x);
float deltay = Math.abs(mLastMotionY - y);
mLastMotionX = x;
mLastMotionY = y;
if (deltaX > deltay && deltaX > minDis) {
isLock = true;
return false;
}
} else {
return false;
}
break;
case MotionEvent.ACTION_UP:
Log.e(test, isIntercept ACTION_UP +isLock);
isLock = false;
break;
case MotionEvent.ACTION_CANCEL:
Log.e(test, isIntercept ACTION_CANCEL +isLock);
isLock = false;
break;
}
return true;
}
}
?
5、XML代码
?
?
6、界面效果

?
?
|