Example usage for android.view ScaleGestureDetector ScaleGestureDetector

List of usage examples for android.view ScaleGestureDetector ScaleGestureDetector

Introduction

In this page you can find the example usage for android.view ScaleGestureDetector ScaleGestureDetector.

Prototype

public ScaleGestureDetector(Context context, OnScaleGestureListener listener, Handler handler) 

Source Link

Document

Creates a ScaleGestureDetector with the supplied listener.

Usage

From source file:com.hippo.largeimageview.GestureRecognizer.java

public GestureRecognizer(Context context, Listener listener) {
    mListener = listener;//ww  w  .j a  v a 2s  .c om
    final Handler handler = new Handler(Looper.getMainLooper());
    mGestureDetector = new GestureDetectorCompat(context, this, handler);
    mGestureDetector.setOnDoubleTapListener(this);
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
        mScaleDetector = new ScaleGestureDetector(context, this, handler);
    } else {
        mScaleDetector = new ScaleGestureDetector(context, this);
    }
}