title: double click/tap map zoom (Android)
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2691235/double-tap-zoom-on-android-mapview">Double Tap -&gt; Zoom on Android MapView?</a>  </p>
  </blockquote>
  
  
  
  <p>I have an <code>Activity</code> that extends <code>MapActivity</code>. I use Google Maps.<br>
  I need to zoom in by double clicking or double tapping.</p>
  
  <p>Can someone help me with this?</p>
  
  <p>I have already looked at the below, but they are not what I'm looking for.</p>
  
  <p><a href="https://stackoverflow.com/questions/2691235/double-tap-zoom-on-android-mapview">Double Tap -&gt; Zoom on Android MapView?</a></p>
  
  <p><a href="https://stackoverflow.com/questions/937313/android-basic-gesture-detection">Fling gesture detection on grid layout</a></p>
  
  <p>I realized that <code>onTouchListener</code> is being called only once, why is that so?</p>
  
  <pre><code>// set Gesture
  detector = new GestureDetector(new GestureReactor());
  mapView.setOnTouchListener(new OnTouchListener() {
      @Override
      public boolean onTouch(View v, MotionEvent event) {
          System.out.println("Inside onTouch");
          return detector.onTouchEvent(event);
      }
  });
  </code></pre>
  
  <p>I have private class:</p>
  
  <pre><code>private class GestureReactor extends SimpleOnGestureListener {
      @Override
      public boolean onDoubleTap(MotionEvent e) {
          System.out.println("inside onDouble");
          controller.zoomInFixing((int) e.getX(), (int) e.getY());
          return super.onDoubleTap(e);
      }
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>private GestureDetector detector;
  </code></pre>