From d8f073487edc21869cccbd5be1a3d97c8074af1f Mon Sep 17 00:00:00 2001 From: SilenceDut Date: Tue, 21 Jun 2016 10:18:34 +0800 Subject: [PATCH] modified animator detail --- .../com/silencedut/expandablelayout/ExpandableLayout.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/library/src/main/java/com/silencedut/expandablelayout/ExpandableLayout.java b/library/src/main/java/com/silencedut/expandablelayout/ExpandableLayout.java index 8183fb2..4c64ddf 100644 --- a/library/src/main/java/com/silencedut/expandablelayout/ExpandableLayout.java +++ b/library/src/main/java/com/silencedut/expandablelayout/ExpandableLayout.java @@ -96,14 +96,9 @@ private void verticalAnimate(final int startHeight, final int endHeight ) { final View target = getChildAt(1); mExpandAnimator = ValueAnimator.ofInt(startHeight,endHeight); mExpandAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { - //private IntEvaluator intEvaluator = new IntEvaluator(); - int lastHeight=0; @Override public void onAnimationUpdate(ValueAnimator animation) { - int height = (int) animation.getAnimatedValue(); - int scrollStep = height-lastHeight; - lastHeight=height; - target.getLayoutParams().height=height; + target.getLayoutParams().height= ( int) animation.getAnimatedValue(); target.requestLayout(); } });