Beispiel #1
0
  @Override
  protected void init() {
    super.init();
    mTouchSlop = ViewConfiguration.get(getContext()).getScaledTouchSlop();
    mGestureListener = getGestureListener();
    mScaleListener = getScaleListener();

    if (mScaleListener != null) {
      mScaleDetector = new ScaleGestureDetector(getContext(), mScaleListener);
    }
    try {
      mGestureDetector = new GestureDetector(getContext(), mGestureListener, null, true);
    } catch (Throwable e) {
    }
    mCurrentScaleFactor = 1f;
    mDoubleTapDirection = 1;
    mRadius = Utils.dip2px(getContext(), RADIUS);
  }