private void init() {
        attacher = new PhotoViewAttacher(this);
        //We always pose as a Matrix scale type, though we can change to another scale type
        //via the attacher
        super.setScaleType(ScaleType.MATRIX);
        //apply the previously applied scale type
        if (pendingScaleType != null) {
            setScaleType(pendingScaleType);
            pendingScaleType = null;
        }
    }
A zoomable {@link ImageView}. See {@link PhotoViewAttacher} for most of the details on how the zooming
is accomplished
main/src/main/java/com/quxianggif/common/view/photoview/PhotoView.java