@Override
  public boolean onDoubleTapEvent(MotionEvent e) {
    AbstractAnimatedZoomableController zc =
        (AbstractAnimatedZoomableController) mDraweeView.getZoomableController();
    PointF vp = new PointF(e.getX(), e.getY());
    PointF ip = zc.mapViewToImage(vp);
    switch (e.getActionMasked()) {
      case MotionEvent.ACTION_DOWN:
        mDoubleTapViewPoint.set(vp);
        mDoubleTapImagePoint.set(ip);
        mDoubleTapScale = zc.getScaleFactor();
        break;
      case MotionEvent.ACTION_MOVE:
        mDoubleTapScroll = mDoubleTapScroll || shouldStartDoubleTapScroll(vp);
        if (mDoubleTapScroll) {
          float scale = calcScale(vp);
          zc.zoomToPoint(scale, mDoubleTapImagePoint, mDoubleTapViewPoint);
        }
        break;
      case MotionEvent.ACTION_UP:
        if (mDoubleTapScroll) {
          float scale = calcScale(vp);
          zc.zoomToPoint(scale, mDoubleTapImagePoint, mDoubleTapViewPoint);
        } else {
          final float maxScale = zc.getMaxScaleFactor();
          final float minScale = zc.getMinScaleFactor();
          if (zc.getScaleFactor() < (maxScale + minScale) / 2) {
            zc.zoomToPoint(
                maxScale, ip, vp, DefaultZoomableController.LIMIT_ALL, DURATION_MS, null);
          } else {
            zc.zoomToPoint(
                minScale, ip, vp, DefaultZoomableController.LIMIT_ALL, DURATION_MS, null);
          }
        }
        mDoubleTapScroll = false;
        break;
    }
    return true;
  }
Tap gesture listener for double tap to zoom / unzoom and double-tap-and-drag to zoom.

@see ZoomableDraweeView#setTapListener(GestureDetector.SimpleOnGestureListener)
samples/zoomable/src/main/java/com/facebook/samples/zoomable/DoubleTapGestureListener.java