Code example for GestureDetectorCompat

0
	public ViewportView(Context context, AttributeSet attrs) {
		super(context, attrs);
 
		this.scroller = new MyScroller(getContext());
		this.zoomer = new MyZoomer(getContext());
		this.gestureDetector = new GestureDetectorCompat(context, new MyGestureListener());
		this.scaleGestureDetector = new ScaleGestureDetector(context, new MyScaleListener());
 
		this.edgeEffectTop = new EdgeEffectCompat(context);
		this.edgeEffectBottom = new EdgeEffectCompat(context);
		this.edgeEffectLeft = new EdgeEffectCompat(context);
		this.edgeEffectRight = new EdgeEffectCompat(context);
 
		setWillNotDraw(false);
 
	} 
 
	// ... GET 
 
	private float[] getMatrixScale() { 
		if (this.matrix == null)