Skip to content

Commit 29cf1cb

Browse files
committed
Add support 14+ API
1 parent bfe833a commit 29cf1cb

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

library/build.gradle

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,14 @@ apply plugin: 'com.android.library'
33
group GROUP
44
version VERSION_NAME
55

6-
dependencies {}
7-
86
android {
97
compileSdkVersion ANDROID_BUILD_SDK_VERSION as int
108
buildToolsVersion ANDROID_BUILD_TOOLS_VERSION
119

1210
defaultConfig {
1311
versionCode 1
1412
versionName version
15-
minSdkVersion 16
13+
minSdkVersion 14
1614
targetSdkVersion ANDROID_BUILD_TARGET_SDK_VERSION as int
1715
}
1816

@@ -34,6 +32,10 @@ android {
3432
}
3533
}
3634

35+
dependencies {
36+
implementation "com.android.support:support-compat:26.1.0"
37+
}
38+
3739
apply from: rootProject.file('checkstyle.gradle')
3840
apply from: 'https://raw.githubusercontent.com/sephiroth74/gradle-mvn-push/master/gradle-mvn-push.gradle'
3941

library/src/main/java/it/sephiroth/android/library/imagezoom/ImageViewTouchBase.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import android.graphics.PointF;
1313
import android.graphics.RectF;
1414
import android.graphics.drawable.Drawable;
15+
import android.support.v4.view.ViewCompat;
1516
import android.util.AttributeSet;
1617
import android.util.Log;
1718
import android.view.ViewConfiguration;
@@ -963,7 +964,7 @@ public void onAnimationUpdate(final ValueAnimator animation) {
963964
panBy(valueX - oldValueX, valueY - oldValueY);
964965
oldValueX = valueX;
965966
oldValueY = valueY;
966-
postInvalidateOnAnimation();
967+
ViewCompat.postInvalidateOnAnimation(ImageViewTouchBase.this);
967968
}
968969
}
969970
);
@@ -1022,7 +1023,7 @@ protected void zoomTo(float scale, float centerX, float centerY, final long dura
10221023
public void onAnimationUpdate(final ValueAnimator animation) {
10231024
float value = (Float) animation.getAnimatedValue();
10241025
zoomTo(value, destX, destY);
1025-
postInvalidateOnAnimation();
1026+
ViewCompat.postInvalidateOnAnimation(ImageViewTouchBase.this);
10261027
}
10271028
}
10281029
);

0 commit comments

Comments
 (0)