I am implementing OnFling. It works only when the velocity is very high. Which means i need to move my finger very very fast so that the Fling will take place. this is the code:
SimpleOnGestureListener simpleOnGestureListener = new SimpleOnGestureListener() {
@Override
public boolean onDoubleTap(MotionEvent e) {
// TODO Auto-generated method stub
Log.v("onDoubleTap: \n", e.toString());
return super.onDoubleTap(e);
}
@Override
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
Log.v("on fling", "on fling");
if ((e1.getY() < CARD_POSITION) && (e2.getY() < CARD_POSITION)
&& (Math.abs(e1.getX() - e2.getX()) > CARD_SWIPE_MIN)){
return super.onFling(e1, e2, velocityX, velocityY);
} else {
return false;
}
}