title: How do I apply a GestureListener to an EditText?
body: <p>I found this code that shows how to create a GestureListener to listen for a double-tap, but I've been unable to figure out how to apply it to my EditText, so that the double-tap is only detected when the user double-taps on the EditText.<br>
  Any help would be appreciated.</p>
  
  <pre><code>public class MyView extends View {
  
  GestureDetector gestureDetector;
  
  public MyView(Context context, AttributeSet attrs) {
      super(context, attrs);
              // creating new gesture detector
      gestureDetector = new GestureDetector(context, new GestureListener());
  }
  
  // skipping measure calculation and drawing
  
      // delegate the event to the gesture detector
  @Override
  public boolean onTouchEvent(MotionEvent e) {
      return gestureDetector.onTouchEvent(e);
  }
  
  
  private class GestureListener extends GestureDetector.SimpleOnGestureListener {
  
      @Override
      public boolean onDown(MotionEvent e) {
          return true;
      }
      // event when double tap occurs
      @Override
      public boolean onDoubleTap(MotionEvent e) {
          float x = e.getX();
          float y = e.getY();
  
          Log.d("Double Tap", "Tapped at: (" + x + "," + y + ")");
  
          return true;
      }
  }
  }
  </code></pre>