<NME> ScaleAnimater.java
<BEF> package com.jpeng.jptabbar.animate;

import android.view.View;
import com.nineoldandroids.animation.AnimatorSet;
import com.nineoldandroids.animation.ObjectAnimator;
import com.nineoldandroids.view.ViewHelper;

/**
 * Author jpeng
 * Date: 16-11-14
 * E-mail:peng8350@gmail.com
 * 实现图标缩放动画者
 */

    @Override
    public void onPressDown(View v, boolean selected) {
//        getSpring().setEndValue(0.1f);
    }

    @Override
    public void onTouchOut(View v, boolean selected) {
//        getSpring().setEndValue(1f);
    }

    @Override
    @Override
    public void onSelectChanged(View v,boolean selected) {
        AnimatorSet scaleAnimator = new AnimatorSet();
        float end = selected?1.2f:1f;
        ObjectAnimator scaleX ;
        scaleX = ObjectAnimator.ofFloat(v,"scaleX",end);
        scaleY  = ObjectAnimator.ofFloat(v,"scaleY",end);
        scaleAnimator.playTogether(scaleX,scaleY);
        scaleAnimator.setDuration(selected?600:300);
        scaleAnimator.start();
    }


    @Override
    public void onPageAnimate(View v,float offset){
        ViewHelper.setScaleX(v, offset*0.2f+1f);
        ViewHelper.setScaleY(v, offset*0.2f+1f);
    }

    @Override
    public boolean isNeedPageAnimate() {
        return true;
    }

}
<MSG> Fix some details

<DFF> @@ -14,12 +14,14 @@ public class ScaleAnimater implements Animatable{
 
     @Override
     public void onPressDown(View v, boolean selected) {
-//        getSpring().setEndValue(0.1f);
+        ViewHelper.setScaleX(v,1.1f);
+        ViewHelper.setScaleY(v,1.1f);
     }
 
     @Override
     public void onTouchOut(View v, boolean selected) {
-//        getSpring().setEndValue(1f);
+        ViewHelper.setScaleX(v,selected?1.2f:1f);
+        ViewHelper.setScaleY(v,selected?1.2f:1f);
     }
 
     @Override
@@ -31,7 +33,7 @@ public class ScaleAnimater implements Animatable{
         scaleX = ObjectAnimator.ofFloat(v,"scaleX",end);
         scaleY  = ObjectAnimator.ofFloat(v,"scaleY",end);
         scaleAnimator.playTogether(scaleX,scaleY);
-        scaleAnimator.setDuration(selected?600:300);
+        scaleAnimator.setDuration(300);
         scaleAnimator.start();
     }
 

{'commit': 'diff --git a/app/src/main/java/com/jpeng/demo/MainActivity.java b/app/src/main/java/com/jpeng/demo/MainActivity.java\nindex 8c4a409..25526f0 100644\n--- a/app/src/main/java/com/jpeng/demo/MainActivity.java\n+++ b/app/src/main/java/com/jpeng/demo/MainActivity.java\n@@ -1,6 +1,5 @@\n package com.jpeng.demo;\n \n-import android.animation.ObjectAnimator;\n import android.os.Bundle;\n import android.support.v4.app.Fragment;\n import android.support.v4.view.ViewPager;\n@@ -10,15 +9,12 @@ import android.widget.Toast;\n import com.jpeng.jptabbar.BadgeDismissListener;\n import com.jpeng.jptabbar.JPTabBar;\n import com.jpeng.jptabbar.OnTabSelectListener;\n-import com.jpeng.jptabbar.animate.Animatable;\n import com.jpeng.jptabbar.anno.NorIcons;\n import com.jpeng.jptabbar.anno.SeleIcons;\n import com.jpeng.jptabbar.anno.Titles;\n-import com.nineoldandroids.view.ViewHelper;\n \n import java.util.ArrayList;\n import java.util.List;\n-import java.util.regex.Matcher;\n \n import static com.jpeng.demo.R.id.tabbar;\n \n@@ -74,11 +70,10 @@ public class MainActivity extends AppCompatActivity implements BadgeDismissListe\n         //设置Badge消失的代理\n         mTabbar.setTabListener(this);\n         mTabbar.setUseScrollAnimate(true);\n-        mTabbar.setUseFilter(true);\n         mTabbar.getMiddleView().setOnClickListener(new View.OnClickListener() {\n             @Override\n             public void onClick(View v) {\n-                Toast.makeText(MainActivity.this,"中间点击",0).show();;\n+                Toast.makeText(MainActivity.this,"中间点击",Toast.LENGTH_SHORT).show();;\n             }\n         });\n     }\ndiff --git a/library/src/main/java/com/jpeng/jptabbar/JPTabBar.java b/library/src/main/java/com/jpeng/jptabbar/JPTabBar.java\nindex 5d53d68..07c70ce 100644\n--- a/library/src/main/java/com/jpeng/jptabbar/JPTabBar.java\n+++ b/library/src/main/java/com/jpeng/jptabbar/JPTabBar.java\n@@ -233,7 +233,7 @@ public class JPTabBar extends LinearLayout implements ViewPager.OnPageChangeList\n             //实例化TabItem添加进去\n             for (int i = 0; i < mJPTabItems.length; i++) {\n                 final int temp = i;\n-                Animatable animater = AnimateType == AnimationType.SCALE ? new Scale2Animater() : AnimateType == AnimationType.ROTATE ? new RotateAnimater() :\n+                Animatable animater = AnimateType == AnimationType.SCALE ? new ScaleAnimater() : AnimateType == AnimationType.ROTATE ? new RotateAnimater() :\n                         AnimateType == AnimationType.FLIP ? new FlipAnimater() : AnimateType == AnimationType.JUMP ? new JumpAnimater() :AnimateType==AnimationType.SCALE2?new Scale2Animater() : null;\n                 mJPTabItems[i] = new JPTabItem.Builder(mContext).setTitle(mTitles == null ? null : mTitles[i]).setIndex(temp).setTextSize(textSize)\n                         .setNormalColor(normalColor).setSelectBg(tabselectbg).setBadgeColor(BadgeColor)\n@@ -590,8 +590,8 @@ public class JPTabBar extends LinearLayout implements ViewPager.OnPageChangeList\n      */\n     public void setAnimation(AnimationType animationType) {\n         for (int i = 0; i < mJPTabItems.length; i++) {\n-            mJPTabItems[i].setAnimater(animationType == AnimationType.SCALE ? new Scale2Animater() : animationType == AnimationType.ROTATE ? new RotateAnimater() :\n-                    animationType == AnimationType.JUMP ? new JumpAnimater() : animationType == AnimationType.FLIP ? new FlipAnimater(): null);\n+            mJPTabItems[i].setAnimater(animationType == AnimationType.SCALE ? new ScaleAnimater() : animationType == AnimationType.ROTATE ? new RotateAnimater() :\n+                    animationType == AnimationType.JUMP ? new JumpAnimater() : animationType == AnimationType.FLIP ? new FlipAnimater():animationType==AnimationType.SCALE2?new Scale2Animater(): null);\n         }\n     }\n \ndiff --git a/library/src/main/java/com/jpeng/jptabbar/animate/JumpAnimater.java b/library/src/main/java/com/jpeng/jptabbar/animate/JumpAnimater.java\nindex e132cf1..8d24e7e 100644\n--- a/library/src/main/java/com/jpeng/jptabbar/animate/JumpAnimater.java\n+++ b/library/src/main/java/com/jpeng/jptabbar/animate/JumpAnimater.java\n@@ -14,13 +14,12 @@ public class JumpAnimater implements Animatable {\n \n     @Override\n     public void onPressDown(View v, boolean selected) {\n-        if(!selected)\n         ViewHelper.setTranslationY(v,-3f);\n     }\n \n     @Override\n     public void onTouchOut(View v, boolean selected) {\n-        ViewHelper.setTranslationY(v,0f);\n+        ViewHelper.setTranslationY(v,selected?-10f:0f);\n     }\n \n     @Override\ndiff --git a/library/src/main/java/com/jpeng/jptabbar/animate/ScaleAnimater.java b/library/src/main/java/com/jpeng/jptabbar/animate/ScaleAnimater.java\nindex f5f3acc..fd468a2 100644\n--- a/library/src/main/java/com/jpeng/jptabbar/animate/ScaleAnimater.java\n+++ b/library/src/main/java/com/jpeng/jptabbar/animate/ScaleAnimater.java\n@@ -14,12 +14,14 @@ public class ScaleAnimater implements Animatable{\n \n     @Override\n     public void onPressDown(View v, boolean selected) {\n-//        getSpring().setEndValue(0.1f);\n+        ViewHelper.setScaleX(v,1.1f);\n+        ViewHelper.setScaleY(v,1.1f);\n     }\n \n     @Override\n     public void onTouchOut(View v, boolean selected) {\n-//        getSpring().setEndValue(1f);\n+        ViewHelper.setScaleX(v,selected?1.2f:1f);\n+        ViewHelper.setScaleY(v,selected?1.2f:1f);\n     }\n \n     @Override\n@@ -31,7 +33,7 @@ public class ScaleAnimater implements Animatable{\n         scaleX = ObjectAnimator.ofFloat(v,"scaleX",end);\n         scaleY  = ObjectAnimator.ofFloat(v,"scaleY",end);\n         scaleAnimator.playTogether(scaleX,scaleY);\n-        scaleAnimator.setDuration(selected?600:300);\n+        scaleAnimator.setDuration(300);\n         scaleAnimator.start();\n     }\n \n', 'commit_subject': 'Fix some details', 'repo_name': 'peng8350/JPTabBar', 'committer': {'name': 'JPeng', 'email': '02c8f4612268414da6ac334fd32efd0aa1389437@gmail.com', 'time_sec': '1507347430', 'tz_offset': '480', 'date': {'seconds': '1507347430'}}, 'commit_tree': '1290c7be9a071b1dd2038fc6b4b3a706508a0023', 'commit_message': 'Fix some details\n', 'language_name': 'Java', 'license': 'apache-2.0', 'hunks': '@@ -14,12 +14,14 @@ public class ScaleAnimater implements Animatable{\n \n     @Override\n     public void onPressDown(View v, boolean selected) {\n-//        getSpring().setEndValue(0.1f);\n+        ViewHelper.setScaleX(v,1.1f);\n+        ViewHelper.setScaleY(v,1.1f);\n     }\n \n     @Override\n     public void onTouchOut(View v, boolean selected) {\n-//        getSpring().setEndValue(1f);\n+        ViewHelper.setScaleX(v,selected?1.2f:1f);\n+        ViewHelper.setScaleY(v,selected?1.2f:1f);\n     }\n \n     @Override\n@@ -31,7 +33,7 @@ public class ScaleAnimater implements Animatable{\n         scaleX = ObjectAnimator.ofFloat(v,"scaleX",end);\n         scaleY  = ObjectAnimator.ofFloat(v,"scaleY",end);\n         scaleAnimator.playTogether(scaleX,scaleY);\n-        scaleAnimator.setDuration(selected?600:300);\n+        scaleAnimator.setDuration(300);\n         scaleAnimator.start();\n     }\n \n', 'addition_count': 5, 'deletion_count': 3, 'src_file': 'a/library/src/main/java/com/jpeng/jptabbar/animate/ScaleAnimater.java', 'tgt_file': 'b/library/src/main/java/com/jpeng/jptabbar/animate/ScaleAnimater.java', 'file_extension': '.java', 'before_file': 'package com.jpeng.jptabbar.animate;\n\nimport android.view.View;\nimport com.nineoldandroids.animation.AnimatorSet;\nimport com.nineoldandroids.animation.ObjectAnimator;\nimport com.nineoldandroids.view.ViewHelper;\n\n/**\n * Author jpeng\n * Date: 16-11-14\n * E-mail:peng8350@gmail.com\n * 实现图标缩放动画者\n */\n\n    @Override\n    public void onPressDown(View v, boolean selected) {\n//        getSpring().setEndValue(0.1f);\n    }\n\n    @Override\n    public void onTouchOut(View v, boolean selected) {\n//        getSpring().setEndValue(1f);\n    }\n\n    @Override\n    @Override\n    public void onSelectChanged(View v,boolean selected) {\n        AnimatorSet scaleAnimator = new AnimatorSet();\n        float end = selected?1.2f:1f;\n        ObjectAnimator scaleX ;\n        scaleX = ObjectAnimator.ofFloat(v,"scaleX",end);\n        scaleY  = ObjectAnimator.ofFloat(v,"scaleY",end);\n        scaleAnimator.playTogether(scaleX,scaleY);\n        scaleAnimator.setDuration(selected?600:300);\n        scaleAnimator.start();\n    }\n\n\n    @Override\n    public void onPageAnimate(View v,float offset){\n        ViewHelper.setScaleX(v, offset*0.2f+1f);\n        ViewHelper.setScaleY(v, offset*0.2f+1f);\n    }\n\n    @Override\n    public boolean isNeedPageAnimate() {\n        return true;\n    }\n\n}', 'message': 'Fix some details\n', 'author_name': 'JPeng', 'lang': 'java'}