title: GestureDetector.SimpleOnGestureListener and GestureDetectorCompat don't work. What's wrong with my code?
body: <p>I'm following <a href="http://developer.android.com/training/gestures/detector.html">Detecting common gestures</a> guide. I have linked to <code>android-support-v4.jar</code> library to get <code>GestureDetectorCompat</code>, and my code seems exactly the same as in the guide, except I'm detecting gestures in my custom view rather than in activity:</p>
  
  <pre><code>public class MyGlView extends GLSurfaceView {
  
      private GestureDetectorCompat m_gestureDetector = null;
  
      public MyGlView(Context context, AttributeSet attrs) {
          super(context, attrs);
          init(context);
      }
      public MyGlView(Context context) {
          super(context);
          init(context);
      }
      private void init(Context context) {
          if (m_gestureDetector == null)
              m_gestureDetector = new GestureDetectorCompat(context, new MyGestureListener());
  
          setEGLContextClientVersion(2);
          setRenderer(new DrawSurfRenderer());
          setRenderMode(RENDERMODE_CONTINUOUSLY); 
      }
  
  @Override
      public boolean onTouchEvent(MotionEvent event) {
  
          m_gestureDetector.onTouchEvent(event);      
          return super.onTouchEvent(event);
      }
  
  public class MyGestureListener extends GestureDetector.SimpleOnGestureListener {
  
          @Override
          public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY)
          {
              Log.e("", "OnScroll: deltaX=" + String.valueOf(e2.getX() - e1.getX()) + ", deltaY=" + String.valueOf(e2.getY() - e1.getY()));
              return true;
          }
  
          @Override
          public boolean onSingleTapUp(MotionEvent e)
          {
              Log.e("", "onSingleTapUp: X=" + String.valueOf(e.getX()) + ", Y=" + String.valueOf(e.getY()));
              return true;
          }
  
          @Override
          public void onLongPress(MotionEvent e)
          {
              Log.e("", "onLongPress: X=" + String.valueOf(e.getX()) + ", Y=" + String.valueOf(e.getY()));
          }
      }
  </code></pre>
  
  <p>No matter what I do with the touchscreen, I'm only getting <code>onLongPress</code>. In fact, when I do fast tap (quickly touching and releasing the screen) I still get <code>onLongPress</code> slightly after I remove my finger from the screen ( suspect that's a long tap detection delay). </p>
  
  <p>What's the catch?</p>