From 7e7cadee4e13a9f9072ee12670b22bc69a76f58a Mon Sep 17 00:00:00 2001 From: Hannes Achleitner Date: Sat, 24 Nov 2018 17:41:39 +0100 Subject: [PATCH] improvements after rebase --- app/build.gradle | 1 - touchview/build.gradle | 2 +- .../com/ortiz/touchview/TouchImageView.java | 21 ++++++++++--------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 48137028..8dd8b908 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -18,6 +18,5 @@ android { } dependencies { - implementation 'androidx.appcompat:appcompat:1.0.1' implementation project(':touchview') } diff --git a/touchview/build.gradle b/touchview/build.gradle index 186bf411..454ab104 100644 --- a/touchview/build.gradle +++ b/touchview/build.gradle @@ -23,5 +23,5 @@ android { } dependencies { - implementation 'androidx.appcompat:appcompat:1.0.1' + api 'androidx.appcompat:appcompat:1.0.2' } \ No newline at end of file diff --git a/touchview/src/main/java/com/ortiz/touchview/TouchImageView.java b/touchview/src/main/java/com/ortiz/touchview/TouchImageView.java index eaad2942..2e50fcff 100644 --- a/touchview/src/main/java/com/ortiz/touchview/TouchImageView.java +++ b/touchview/src/main/java/com/ortiz/touchview/TouchImageView.java @@ -41,16 +41,16 @@ import androidx.appcompat.widget.AppCompatImageView; public class TouchImageView extends AppCompatImageView { - - private static final String DEBUG = "DEBUG"; - - // - // SuperMin and SuperMax multipliers. Determine how much the image can be - // zoomed below or above the zoom boundaries, before animating back to the - // min/max zoom boundary. - // - private static final float SUPER_MIN_MULTIPLIER = .75f; - private static final float SUPER_MAX_MULTIPLIER = 1.25f; + + private static final String DEBUG = "DEBUG"; + + // + // SuperMin and SuperMax multipliers. Determine how much the image can be + // zoomed below or above the zoom boundaries, before animating back to the + // min/max zoom boundary. + // + private static final float SUPER_MIN_MULTIPLIER = .75f; + private static final float SUPER_MAX_MULTIPLIER = 1.25f; // // Scale of image ranges from minScale to maxScale, where minScale == 1 @@ -66,6 +66,7 @@ public class TouchImageView extends AppCompatImageView { private Matrix matrix, prevMatrix; public enum FixedPixel {CENTER, TOP_LEFT, BOTTOM_RIGHT} + private FixedPixel orientationChangeFixedPixel = FixedPixel.CENTER; private FixedPixel viewSizeChangeFixedPixel = FixedPixel.CENTER; private boolean orientationJustChanged = false;