From 19a4aa49bd5025e4ba51b7f71e89522f3c3018bd Mon Sep 17 00:00:00 2001 From: florent champigny Date: Tue, 10 May 2016 10:33:11 +0200 Subject: [PATCH] version 1.0.3 removed nineold api 11+ --- README.md | 5 +-- build.gradle | 7 ++-- gradle/bintray-android-v1.gradle | 2 +- sample/sample.iml | 42 ++++++++++++------- viewanimator/build.gradle | 7 ++-- .../viewanimator/AnimationBuilder.java | 21 +++++----- .../florent37/viewanimator/ViewAnimator.java | 7 ++-- viewanimator/viewanimator.iml | 11 +++-- 8 files changed, 58 insertions(+), 44 deletions(-) diff --git a/README.md b/README.md index c83ded4..341a221 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ViewAnimator ======= -[![API](https://img.shields.io/badge/API-9%2B-green.svg)](https://github.com/florent37/ViewAnimator/tree/master) +[![API](https://img.shields.io/badge/API-11%2B-green.svg)](https://github.com/florent37/ViewAnimator/tree/master) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-ViewAnimator-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/2942) A fluent Android animation library ! @@ -185,8 +185,7 @@ Add into your **build.gradle** [![Download](https://api.bintray.com/packages/florent37/maven/ViewAnimator/images/download.svg)](https://bintray.com/florent37/maven/ViewAnimator/_latestVersion) ```groovy -compile 'com.github.florent37:viewanimator:1.0.3@aar' -compile 'com.nineoldandroids:library:2.4.0' +compile 'com.github.florent37:viewanimator:1.0.4' ``` #Community diff --git a/build.gradle b/build.gradle index e27564d..690323e 100644 --- a/build.gradle +++ b/build.gradle @@ -9,9 +9,8 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:2.1.0' - classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3' - classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0' + classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } @@ -21,11 +20,11 @@ ext{ COMPILE_SDK=23 TARGET_SDK=23 BUILD_TOOL="23.0.2" - minSdkVersion = 9 + minSdkVersion = 11 sourceCompatibilityVersion = JavaVersion.VERSION_1_7 targetCompatibilityVersion = JavaVersion.VERSION_1_7 - libraryVersion="1.0.3" + libraryVersion="1.0.4" } allprojects { diff --git a/gradle/bintray-android-v1.gradle b/gradle/bintray-android-v1.gradle index 0101dd5..271adf1 100644 --- a/gradle/bintray-android-v1.gradle +++ b/gradle/bintray-android-v1.gradle @@ -8,7 +8,7 @@ task sourcesJar(type: Jar) { } task javadoc(type: Javadoc) { - source = android.sourceSets.main.java.srcDirs + //source = android.sourceSets.main.java.srcDirs classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) } diff --git a/sample/sample.iml b/sample/sample.iml index 7d6447c..1a67deb 100644 --- a/sample/sample.iml +++ b/sample/sample.iml @@ -64,14 +64,6 @@ - - - - - - - - @@ -80,28 +72,50 @@ + + + + + + + + - - + + + + + + + + + + + + + + + - - + - - + + + + \ No newline at end of file diff --git a/viewanimator/build.gradle b/viewanimator/build.gradle index a0db155..650920b 100644 --- a/viewanimator/build.gradle +++ b/viewanimator/build.gradle @@ -14,12 +14,11 @@ android { } } -version = "1.0.1" - dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') - compile 'com.android.support:support-annotations:23.1.1' - compile 'com.nineoldandroids:library:2.4.0' + compile 'com.android.support:support-v4:23.3.0' + compile 'com.android.support:appcompat-v7:23.3.0' + compile 'com.android.support:support-annotations:23.3.0' } ext { diff --git a/viewanimator/src/main/java/com/github/florent37/viewanimator/AnimationBuilder.java b/viewanimator/src/main/java/com/github/florent37/viewanimator/AnimationBuilder.java index 0cc2121..942c41f 100644 --- a/viewanimator/src/main/java/com/github/florent37/viewanimator/AnimationBuilder.java +++ b/viewanimator/src/main/java/com/github/florent37/viewanimator/AnimationBuilder.java @@ -1,8 +1,13 @@ package com.github.florent37.viewanimator; +import android.animation.Animator; +import android.animation.ArgbEvaluator; +import android.animation.ObjectAnimator; +import android.animation.ValueAnimator; import android.graphics.Path; import android.graphics.PathMeasure; import android.support.annotation.IntRange; +import android.support.v4.view.ViewCompat; import android.util.Log; import android.view.View; import android.view.animation.AccelerateInterpolator; @@ -11,12 +16,6 @@ import android.view.animation.Interpolator; import android.widget.TextView; -import com.nineoldandroids.animation.Animator; -import com.nineoldandroids.animation.ArgbEvaluator; -import com.nineoldandroids.animation.ObjectAnimator; -import com.nineoldandroids.animation.ValueAnimator; -import com.nineoldandroids.view.ViewHelper; - import java.util.ArrayList; import java.util.List; @@ -27,7 +26,7 @@ public class AnimationBuilder { private final ViewAnimator viewAnimator; private final View[] views; - private final List animatorList = new ArrayList(); + private final List animatorList = new ArrayList<>(); private boolean waitForHeight; private boolean nextValueWillBeDp = false; private Interpolator singleInterpolator = null; @@ -185,7 +184,7 @@ public AnimationBuilder scale(float... scale) { */ public AnimationBuilder pivotX(float pivotX) { for (View view : views) { - ViewHelper.setPivotX(view, pivotX); + ViewCompat.setPivotX(view, pivotX); } return this; } @@ -198,7 +197,7 @@ public AnimationBuilder pivotX(float pivotX) { */ public AnimationBuilder pivotY(float pivotY) { for (View view : views) { - ViewHelper.setPivotY(view, pivotY); + ViewCompat.setPivotY(view, pivotY); } return this; } @@ -711,8 +710,8 @@ public void update(View view, float value) { pathMeasure.getPosTan(value, currentPosition, null); final float x = currentPosition[0]; final float y = currentPosition[1]; - ViewHelper.setX(view,x); - ViewHelper.setY(view,y); + ViewCompat.setX(view, x); + ViewCompat.setY(view, y); Log.d(null, "path: value=" + value + ", x=" + x + ", y=" + y); } }, 0, pathMeasure.getLength()); diff --git a/viewanimator/src/main/java/com/github/florent37/viewanimator/ViewAnimator.java b/viewanimator/src/main/java/com/github/florent37/viewanimator/ViewAnimator.java index ed1df86..3ee6411 100644 --- a/viewanimator/src/main/java/com/github/florent37/viewanimator/ViewAnimator.java +++ b/viewanimator/src/main/java/com/github/florent37/viewanimator/ViewAnimator.java @@ -1,15 +1,14 @@ package com.github.florent37.viewanimator; +import android.animation.Animator; +import android.animation.AnimatorSet; +import android.animation.ValueAnimator; import android.support.annotation.IntDef; import android.support.annotation.IntRange; import android.view.View; import android.view.ViewTreeObserver; import android.view.animation.Interpolator; -import com.nineoldandroids.animation.Animator; -import com.nineoldandroids.animation.AnimatorSet; -import com.nineoldandroids.animation.ValueAnimator; - import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.util.ArrayList; diff --git a/viewanimator/viewanimator.iml b/viewanimator/viewanimator.iml index e9a5240..67af96f 100644 --- a/viewanimator/viewanimator.iml +++ b/viewanimator/viewanimator.iml @@ -1,5 +1,5 @@ - + @@ -96,12 +96,17 @@ + + - - + + + + + \ No newline at end of file