Это то, что я в итоге использовал
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
float velocityY) {
// TODO Auto-generated method stub
if (velocityX <= 0 ){
// hack - send event to simulate right key press
KeyEvent rightKey = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DPAD_RIGHT);
this.onKeyDown(KeyEvent.KEYCODE_DPAD_RIGHT, rightKey);
rightKey = new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DPAD_RIGHT);
this.onKeyUp(KeyEvent.KEYCODE_DPAD_RIGHT, rightKey);
}else{
// hack - send event to simulate left key press
KeyEvent leftKey = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DPAD_LEFT);
this.onKeyDown(KeyEvent.KEYCODE_DPAD_LEFT, leftKey);
leftKey = new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DPAD_LEFT);
this.onKeyUp(KeyEvent.KEYCODE_DPAD_LEFT, leftKey);
}
// your callback activity if you have one:
if( callbackActivity != null ){
callbackActivity.didFlingGallery();
}
return true;
}