title: Long press in GestureDetector also fires on tap
body: <p>I tried implementing code from this question: <a href="https://stackoverflow.com/questions/7919865/detecting-a-long-press-with-android">Detecting a long press with Android</a>, but it always detects a long press, if even I just tap it. My code is as follows (I extended <code>ImageView</code>, because more code is in it, not relevant for this question):</p>
  
  <pre><code>public class EbsImageView extends ImageView  {
      final GestureDetector gestureDetector = new GestureDetector(this.getContext(), new GestureDetector.SimpleOnGestureListener() {
          public void onLongPress(MotionEvent e) {
              Log.e("", "Longpress detected");
          }
      public boolean onSingleTapUP(MotionEvent e) {
          Log.e("", "Press detected");
  
              // don't consume, we want the long press to fire if it was a 
              // long press
          return false;
          }
      });
  
      @Override
      public boolean onTouchEvent(MotionEvent event) {
          return gestureDetector.onTouchEvent(event);
      }
  }
  </code></pre>