@Override
            public boolean onFling(MotionEvent e1, MotionEvent e2,
                                   float velocityX, float velocityY) {
                if (mSingleFlingListener != null) {
                    if (getScale() > DEFAULT_MIN_SCALE) {
                        return false;
                    }

                    if (MotionEventCompat.getPointerCount(e1) > SINGLE_TOUCH
                            || MotionEventCompat.getPointerCount(e2) > SINGLE_TOUCH) {
                        return false;
                    }

                    return mSingleFlingListener.onFling(e1, e2, velocityX, velocityY);
                }
                return false;
            }
The component of {@link PhotoView} which does the work allowing for zooming, scaling, panning, etc.
It is made public in case you need to subclass something other than {@link ImageView} and still
gain the functionality that {@link PhotoView} offers
main/src/main/java/com/quxianggif/common/view/photoview/PhotoViewAttacher.java