Android examples for Animation:Translate Animation
Use ObjectAnimator to animate on translationY
import android.animation.ObjectAnimator; import android.support.v7.widget.RecyclerView; public class Main{ public static void animate(RecyclerView.ViewHolder holder, boolean goesDown) { ObjectAnimator animatorTranslateY = ObjectAnimator.ofFloat( holder.itemView, "translationY", goesDown == true ? 200 : -200, 0);/*from w w w . j av a 2 s.c o m*/ animatorTranslateY.setDuration(500); animatorTranslateY.start(); } }