Back to project page DragHelperView.
The source code is released under:
Apache License
If you think the Android project DragHelperView listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package so.library.draghelper.helper.animation; /*w w w.j a v a 2 s .c om*/ import android.view.View; import android.view.animation.Animation; import android.view.animation.Transformation; /** * Created by minkyu on 2015. 1. 22.. */ public class SlideDownAnimation extends Animation { final float targetTranslationY; View view; public SlideDownAnimation(View view, float targetTranslationY){ this.view = view; this.targetTranslationY = targetTranslationY; } @Override protected void applyTransformation(float interpolatedTime, Transformation t) { view.setTranslationY(targetTranslationY * interpolatedTime); view.requestLayout(); } @Override public void initialize(int width, int height, int parentWidth, int parentHeight) { super.initialize(width, height, parentWidth, parentHeight); } @Override public boolean willChangeBounds() { return true; } }