From f0838c6f080482e111a8b44f02fff8f8ff1e8e41 Mon Sep 17 00:00:00 2001 From: PavelRatushnyi Date: Sat, 30 Sep 2017 18:24:28 +0300 Subject: [PATCH 1/2] Increase support library and build tools versions --- OsmAnd/build.gradle | 11 +++++------ .../AudioVideoNoteRecordingMenuFullScreen.java | 14 ++++++-------- OsmAndCore-sample/build.gradle | 6 +++--- 3 files changed, 14 insertions(+), 17 deletions(-) diff --git a/OsmAnd/build.gradle b/OsmAnd/build.gradle index 348c7b40f6..572d18c872 100644 --- a/OsmAnd/build.gradle +++ b/OsmAnd/build.gradle @@ -18,7 +18,7 @@ apply plugin: 'com.android.application' android { compileSdkVersion 26 - buildToolsVersion "26.0.0" + buildToolsVersion "26.0.1" signingConfigs { development { @@ -61,7 +61,6 @@ android { } dexOptions { - incremental true javaMaxHeapSize "4g" } @@ -385,10 +384,10 @@ dependencies { // compile project(':eclipse-compile:design') // compile project(':eclipse-compile:cardview') // compile project(':eclipse-compile:gridlayout') - compile 'com.android.support:gridlayout-v7:25.+' - compile 'com.android.support:cardview-v7:25.+' - compile 'com.android.support:appcompat-v7:25.+' - compile 'com.android.support:design:25.+' + compile 'com.android.support:gridlayout-v7:26.1.0' + compile 'com.android.support:cardview-v7:26.1.0' + compile 'com.android.support:appcompat-v7:26.1.0' + compile 'com.android.support:design:26.1.0' compile fileTree(include: ['*.jar'], exclude: ['QtAndroid-bundled.jar', 'QtAndroidAccessibility-bundled.jar', 'OsmAndCore_android.jar', 'OsmAndCore_wrapper.jar', 'android-support-multidex.jar'], dir: 'libs') legacyCompile "net.osmand:OsmAndCore_android:0.1-SNAPSHOT@jar" qtcoredebugCompile "net.osmand:OsmAndCore_androidNativeDebug:0.1-SNAPSHOT@aar" diff --git a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNoteRecordingMenuFullScreen.java b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNoteRecordingMenuFullScreen.java index 3aabc07191..17bc545085 100644 --- a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNoteRecordingMenuFullScreen.java +++ b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNoteRecordingMenuFullScreen.java @@ -1,11 +1,9 @@ package net.osmand.plus.audionotes; +import android.animation.ValueAnimator; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Matrix; -import android.support.v4.animation.AnimatorCompatHelper; -import android.support.v4.animation.AnimatorUpdateListenerCompat; -import android.support.v4.animation.ValueAnimatorCompat; import android.support.v4.app.Fragment; import android.support.v4.view.ViewCompat; import android.util.DisplayMetrics; @@ -25,7 +23,7 @@ public class AudioVideoNoteRecordingMenuFullScreen extends AudioVideoNoteRecordi protected ImageView imageview; protected ProgressBar progressBar; - protected ValueAnimatorCompat animatorCompat; + protected ValueAnimator animatorCompat; public AudioVideoNoteRecordingMenuFullScreen(AudioVideoNotesPlugin plugin, double lat, double lon) { super(plugin, lat, lon); @@ -133,14 +131,14 @@ public class AudioVideoNoteRecordingMenuFullScreen extends AudioVideoNoteRecordi ViewCompat.setAlpha(progressBar, 1f); progressBar.setVisibility(View.VISIBLE); - animatorCompat = AnimatorCompatHelper.emptyValueAnimator(); + animatorCompat = ValueAnimator.ofInt(0); final Interpolator interpolator = new LinearInterpolator(); animatorCompat.setDuration(duration); animatorCompat.setTarget(progressBar); - animatorCompat.addUpdateListener(new AnimatorUpdateListenerCompat() { + animatorCompat.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { @Override - public void onAnimationUpdate(ValueAnimatorCompat animation) { - float fraction = interpolator.getInterpolation(animation.getAnimatedFraction()); + public void onAnimationUpdate(ValueAnimator valueAnimator) { + float fraction = interpolator.getInterpolation(valueAnimator.getAnimatedFraction()); progressBar.setProgress((int)(500 * fraction)); } }); diff --git a/OsmAndCore-sample/build.gradle b/OsmAndCore-sample/build.gradle index 80d8b9f02f..e6400f00a7 100644 --- a/OsmAndCore-sample/build.gradle +++ b/OsmAndCore-sample/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'com.android.application' android { compileSdkVersion 26 - buildToolsVersion "26.0.0" + buildToolsVersion "26.0.1" dexOptions { jumboMode true @@ -110,8 +110,8 @@ repositories { dependencies { compile project(path: ':OsmAnd-java', configuration: 'android') - compile 'com.android.support:appcompat-v7:25.+' - compile 'com.android.support:design:25.+' + compile 'com.android.support:appcompat-v7:26.1.0' + compile 'com.android.support:design:26.1.0' compile fileTree(dir: "libs", include: ["*.jar"]) compile "net.osmand:OsmAndCore_android:0.1-SNAPSHOT@aar" debugCompile "net.osmand:OsmAndCore_androidNativeRelease:0.1-SNAPSHOT@aar" From 9029a028aafbb8926db491436c32de7dbd277993 Mon Sep 17 00:00:00 2001 From: PavelRatushnyi Date: Sun, 1 Oct 2017 12:42:08 +0300 Subject: [PATCH 2/2] Fix incremental --- OsmAnd/build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/build.gradle b/OsmAnd/build.gradle index 572d18c872..9c1b0ce045 100644 --- a/OsmAnd/build.gradle +++ b/OsmAnd/build.gradle @@ -61,6 +61,7 @@ android { } dexOptions { + incremental true javaMaxHeapSize "4g" }