List of usage examples for android.view ViewGroup setTranslationY
public void setTranslationY(float translationY)
From source file:io.digibyte.tools.animation.BRAnimator.java
public static void animateSignalSlide(ViewGroup signalLayout, final boolean reverse, final OnSlideAnimationEnd listener) { float translationY = signalLayout.getTranslationY(); float signalHeight = signalLayout.getHeight(); signalLayout.setTranslationY(reverse ? translationY : translationY + signalHeight); signalLayout.animate().translationY(reverse ? BreadActivity.screenParametersPoint.y : translationY) .setDuration(SLIDE_ANIMATION_DURATION) .setInterpolator(reverse ? new DecelerateInterpolator() : new OvershootInterpolator(0.7f)) .setListener(new AnimatorListenerAdapter() { @Override/*from w ww .ja v a 2s. c om*/ public void onAnimationEnd(Animator animation) { super.onAnimationEnd(animation); if (listener != null) listener.onAnimationEnd(); } }); }