@Override
    public void onConfigurationChanged(Configuration newConfig) {
        super.onConfigurationChanged(newConfig);
        savePreviousImageValues();
    }
Save the current matrix and view dimensions
in the prevMatrix and prevView variables.
app/src/main/java/home/smart/fly/animations/customview/gallery/TouchImageView.java