unFocus Animation - Android android.view.animation

Android examples for android.view.animation:Effect Animation

Description

unFocus Animation

Demo Code

import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.view.View;

public class Main{

    public static void unFocusAnim(View view) {
        float toValue = 1.0f;
        ObjectAnimator animatorX = ObjectAnimator.ofFloat(view, "scaleX",
                toValue);/*from   www .j  av  a2  s  .c  o m*/
        ObjectAnimator animatorY = ObjectAnimator.ofFloat(view, "scaleY",
                toValue);
        AnimatorSet animatorSet = new AnimatorSet();
        animatorSet.setDuration(300);
        animatorSet.playTogether(animatorX, animatorY);
        animatorSet.start();
    }

}

Related Tutorials