From 1ecad8d46f112cccb94138accf6ac7366d03cf7d Mon Sep 17 00:00:00 2001 From: H07000223 <867318349@qq.com> Date: Sat, 23 Apr 2016 13:06:41 +0800 Subject: [PATCH] remove the dependence of NineOldAnimation --- FlycoTabLayout_Lib/build.gradle | 11 ++++++----- .../java/com/flyco/tablayout/CommonTabLayout.java | 4 ++-- .../java/com/flyco/tablayout/SegmentTabLayout.java | 4 ++-- .../com/flyco/tablayout/listener/CustomTabEntity.java | 5 +++-- README.md | 9 +++++++++ README_CN.md | 10 +++++++++- app/build.gradle | 7 +++++-- build.gradle | 4 ++-- gradle/wrapper/gradle-wrapper.properties | 2 +- 9 files changed, 39 insertions(+), 17 deletions(-) diff --git a/FlycoTabLayout_Lib/build.gradle b/FlycoTabLayout_Lib/build.gradle index 8ccc3959..4acd42e3 100644 --- a/FlycoTabLayout_Lib/build.gradle +++ b/FlycoTabLayout_Lib/build.gradle @@ -3,15 +3,15 @@ apply plugin: 'com.android.library' //apply plugin: 'com.jfrog.bintray' // 这个version是区分library版本的,因此当我们需要更新library时记得修改这个version -version = "2.0.0" +version = "2.0.2" android { compileSdkVersion 23 buildToolsVersion "23.0.2" defaultConfig { - minSdkVersion 8 + minSdkVersion 11 targetSdkVersion 23 - versionCode 200 + versionCode 202 versionName version } buildTypes { @@ -24,8 +24,9 @@ android { dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:support-v4: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.nineoldandroids:library:2.4.0' } //def siteUrl = 'https://github.com/H07000223' // 项目的主页 diff --git a/FlycoTabLayout_Lib/src/main/java/com/flyco/tablayout/CommonTabLayout.java b/FlycoTabLayout_Lib/src/main/java/com/flyco/tablayout/CommonTabLayout.java index 2de3f779..1bde0a9a 100644 --- a/FlycoTabLayout_Lib/src/main/java/com/flyco/tablayout/CommonTabLayout.java +++ b/FlycoTabLayout_Lib/src/main/java/com/flyco/tablayout/CommonTabLayout.java @@ -1,5 +1,7 @@ package com.flyco.tablayout; +import android.animation.TypeEvaluator; +import android.animation.ValueAnimator; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Canvas; @@ -29,8 +31,6 @@ import com.flyco.tablayout.utils.FragmentChangeManager; import com.flyco.tablayout.utils.UnreadMsgUtils; import com.flyco.tablayout.widget.MsgView; -import com.nineoldandroids.animation.TypeEvaluator; -import com.nineoldandroids.animation.ValueAnimator; import java.util.ArrayList; diff --git a/FlycoTabLayout_Lib/src/main/java/com/flyco/tablayout/SegmentTabLayout.java b/FlycoTabLayout_Lib/src/main/java/com/flyco/tablayout/SegmentTabLayout.java index 6f6e5599..a7a96bb4 100644 --- a/FlycoTabLayout_Lib/src/main/java/com/flyco/tablayout/SegmentTabLayout.java +++ b/FlycoTabLayout_Lib/src/main/java/com/flyco/tablayout/SegmentTabLayout.java @@ -1,5 +1,7 @@ package com.flyco.tablayout; +import android.animation.TypeEvaluator; +import android.animation.ValueAnimator; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Canvas; @@ -25,8 +27,6 @@ import com.flyco.tablayout.utils.FragmentChangeManager; import com.flyco.tablayout.utils.UnreadMsgUtils; import com.flyco.tablayout.widget.MsgView; -import com.nineoldandroids.animation.TypeEvaluator; -import com.nineoldandroids.animation.ValueAnimator; import java.util.ArrayList; diff --git a/FlycoTabLayout_Lib/src/main/java/com/flyco/tablayout/listener/CustomTabEntity.java b/FlycoTabLayout_Lib/src/main/java/com/flyco/tablayout/listener/CustomTabEntity.java index 3c5e7409..52da607a 100644 --- a/FlycoTabLayout_Lib/src/main/java/com/flyco/tablayout/listener/CustomTabEntity.java +++ b/FlycoTabLayout_Lib/src/main/java/com/flyco/tablayout/listener/CustomTabEntity.java @@ -1,12 +1,13 @@ package com.flyco.tablayout.listener; -import android.view.View; -import android.view.ViewGroup; +import android.support.annotation.DrawableRes; public interface CustomTabEntity { String getTabTitle(); + @DrawableRes int getTabSelectedIcon(); + @DrawableRes int getTabUnselectedIcon(); } \ No newline at end of file diff --git a/README.md b/README.md index 2db85023..77735641 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,9 @@ can be used freely with other widgets together. - remove the dependence of FlycoRoundView - new added method getIconView and getTitleView + > v2.0.2(2016-04-23) + - remove the dependence of NineOldAnimation(only support 3.0+) + ##Gradle @@ -62,6 +65,12 @@ dependencies{ compile 'com.nineoldandroids:library:2.4.0' compile 'com.flyco.tablayout:FlycoTabLayout_Lib:2.0.0@aar' } + +After v2.0.2(support 3.0+) +dependencies{ + compile 'com.android.support:support-v4:23.1.1' + compile 'com.flyco.tablayout:FlycoTabLayout_Lib:2.0.2@aar' +} ``` ##Attributes diff --git a/README_CN.md b/README_CN.md index ead35803..cb7ec40d 100644 --- a/README_CN.md +++ b/README_CN.md @@ -44,6 +44,8 @@ - 删除了对FlycoRoundView库的依赖 - 新增方法getIconView和getTitleView(为了某些情况需要动态更新icon之类的) + > v2.0.2(2016-04-23) + - 删除了对NineOldAnimation库依赖(仅支持3.0+) ##Gradle @@ -55,12 +57,18 @@ dependencies{ compile 'com.flyco.tablayout:FlycoTabLayout_Lib:1.5.0@aar' } -After v2.0.0 +After v2.0.0(support 2.2+) dependencies{ compile 'com.android.support:support-v4:23.1.1' compile 'com.nineoldandroids:library:2.4.0' compile 'com.flyco.tablayout:FlycoTabLayout_Lib:2.0.0@aar' } + +After v2.0.2(support 3.0+) +dependencies{ + compile 'com.android.support:support-v4:23.1.1' + compile 'com.flyco.tablayout:FlycoTabLayout_Lib:2.0.2@aar' +} ``` ##Attributes diff --git a/app/build.gradle b/app/build.gradle index 1ffc0152..93376795 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -6,7 +6,7 @@ android { defaultConfig { applicationId "com.flyco.tablayoutsamples" - minSdkVersion 8 + minSdkVersion 11 targetSdkVersion 23 versionCode 1 versionName "1.0" @@ -21,9 +21,12 @@ android { dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:23.1.1' + compile 'com.android.support:appcompat-v7:23.3.0' compile project(':FlycoTabLayout_Lib') + //--->support 3.0+ +// compile 'com.flyco.tablayout:FlycoTabLayout_Lib:2.0.2@aar' + //--->support 2.2+ // compile 'com.flyco.tablayout:FlycoTabLayout_Lib:2.0.0@aar' // compile 'com.nineoldandroids:library:2.4.0' } diff --git a/build.gradle b/build.gradle index 8d13bde1..0fb6d67f 100644 --- a/build.gradle +++ b/build.gradle @@ -5,9 +5,9 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:1.5.0' + classpath 'com.android.tools.build:gradle:2.0.0' // 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.2' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index b3133b8d..9a12b975 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip