Code example for ScaleGestureDetector

Methods: getScaleFactor

    // Still not used 
    private class ScaleListener extends ScaleGestureDetector.SimpleOnScaleGestureListener {
        public boolean onScale(ScaleGestureDetector detector) {
            mScaleFactor *= detector.getScaleFactor();
            // Don't let the object get too small or too large. 
            mScaleFactor = Math.max(0.1f, Math.min(mScaleFactor, 5.0f));
            return true; 
    private PointF getMidPoint(float x1, float y1, float x2, float y2) {
        PointF point = new PointF();
        float x = x1 + x2;
        float y = y1 + y2;
Stop searching for code, let great code find you!  Add Codota to your java IDE