1

I know it is possible to run series of animation at same time with animationset like this :

AnimationSet animationSet = new AnimationSet(true);
                                animationSet.addAnimation(new RotateAnimation(this,0));
                                /**
                                 * more animation
                                 */
                                animationSet.addAnimation(new RotateAnimation(this,90));
                                animationSet.start();

I want to achieve something similar with viewanimator (animated series of views at same time) :

ViewPropertyAnimator a = v.animate().rotation(0).setDuration(500);

Is there a way I can achieve this ?

Belvi Nosakhare
  • 3,107
  • 5
  • 32
  • 65

1 Answers1

0

If only one or two properties on a View object are being animated, then using an ObjectAnimator is fine.But if several properties are animated simultaneously, or if you just want a more convenient syntax to animate a specific property, then ViewPropertyAnimator might be more well-suited to the task.

    view.animate().scaleX(2).scaleY(4).rotation(180).
    setDuration(3000).setInterpolator(new 
    AccelerateDecelerateInterpolator()).start();
Bishoy Kamel
  • 2,327
  • 2
  • 17
  • 29