scale Y RecyclerView - Android Animation

Android examples for Animation:Scale Animation

Description

scale Y RecyclerView

Demo Code


import android.animation.Animator;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.animation.AccelerateInterpolator;
import android.view.animation.DecelerateInterpolator;
import android.view.animation.OvershootInterpolator;

public class Main{
    public static void scaleY(RecyclerView.ViewHolder holder) {
        holder.itemView.setScaleY(0);/*from ww w.j a  v a2 s .co m*/

        PropertyValuesHolder propy = PropertyValuesHolder.ofFloat("scaleY",
                1);

        ObjectAnimator animator = ObjectAnimator.ofPropertyValuesHolder(
                holder.itemView, propy);

        animator.setDuration(800);
        animator.start();
    }
}

Related Tutorials