мой ответ:
public class CustomGallery extends Gallery {
public CustomGallery(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
public CustomGallery(Context context, AttributeSet attrs) {
super(context, attrs);
}
public CustomGallery(Context context) {
super(context);
}
@Override
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
float r = (velocityX > 0 ? Math.min(800f, velocityX) : Math.max(-800f, velocityX));
return super.onFling(e1, e2, r, velocityY);
}
float oldX, oldY;
boolean isDown = false;
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
int action = ev.getAction();
switch (action) {
case MotionEvent.ACTION_DOWN:
oldX = ev.getX();
oldY = ev.getY();
isDown = true;
return super.onInterceptTouchEvent(ev);
case MotionEvent.ACTION_MOVE:
if (isDown) {
float diffX = Math.abs(ev.getX() - oldX);
float diffY = Math.abs(ev.getY() - oldY) + 20f;
if (diffY > diffX) {
return false;// handled by TextView
}
}
return true;// handled by Gallery
case MotionEvent.ACTION_UP:
isDown = false;
return super.onInterceptTouchEvent(ev);
default:
return super.onInterceptTouchEvent(ev);
}
}
}
спасибо за @teepee за огромную подсказку для решения: D