onSingleTapUp of SimpleOnGestureListener Not working properly
<p>I have the below code:</p>

<pre><code>@Override
    public boolean onSingleTapUp(MotionEvent event) {
    int action = event.getAction();
    if (action == MotionEvent.ACTION_UP) {
        if (event.getRawX() &gt; widthPixels / 2) {
        // move to next screen
        } else {
        // move to previous screen
        }
    }
    return true;
    }
</code></pre>

<p>This code works fine but what happens is most of the times it moves to to screens forward or backward instead of moving to one screen.</p>

<p>Why is it so and what am I doing wrong here? </p>
