@Override
        public boolean onScale(ScaleGestureDetector detector) {
            scaleImage(detector.getScaleFactor(), detector.getFocusX(), detector.getFocusY(), true);

            //
            // OnTouchImageViewListener is set: TouchImageView pinch zoomed by user.
            //
            if (touchImageViewListener != null) {
                touchImageViewListener.onMove();
            }
            return true;
        }
ScaleListener detects user two finger scaling and scales image.

@author Ortiz
app/src/main/java/home/smart/fly/animations/customview/gallery/TouchImageView.java