I used the https://play.google.com/store/apps/details?id=com.davemac327.gesture.tool&hl=en
gesture tool and noticed that for a line which is top to bottom vertic
There was problem with the above code which i solved by introducing
GestureOverlayView gestures = (GestureOverlayView) findViewById(R.id.gestures);
gestures.setGestureStrokeAngleThreshold( 90.0f);
As the default value of the angle threashold is 40.0f because of which simple vertical gestures would be skipped so changed it to 90.0f, so finally setting the GestureStrokeAngleThreshold to a value closer to 90.0f works fine