попробуйте этот код
/**
* Handle touch event coming from Android system.
*/
public boolean onTouch(View v, MotionEvent event) {
this.lastControlsUseMillis = System.currentTimeMillis();
Log.v(TAG, ""+event.getAction());
if (!gestureDetector.onTouchEvent(event)) {
Log.v(TAG, ""+event.getAction());
if (event.getAction() == MotionEvent.ACTION_DOWN) {
Log.e(TAG, " - DOWN -");
Log.e(TAG, " getX: " + event.getX());
downX = event.getX();
downY = event.getY();
lastX = downX;
lastY = downY;
lockedVertically = verticalScrollLock;
maxExcursionY = 0;
scroller = null;
}
else if
(event.getAction() == MotionEvent.ACTION_UP){
Log.e(TAG, " - UP -");
Log.e(TAG, " getY: " + event.getY());
}
else if (event.getAction() == MotionEvent.ACTION_MOVE){
if (lockedVertically && unlocksVerticalLock(event))
lockedVertically = false;
float dx = event.getX() - lastX;
float dy = event.getY() - lastY;
float excursionY = Math.abs(event.getY() - downY);
if (excursionY > maxExcursionY)
maxExcursionY = excursionY;
if (lockedVertically)
dx = 0;
doScroll((int)-dx, (int)-dy);
lastX = event.getX();
lastY = event.getY();
}
}
return true;
}