Android creating ViewPropertyAnimator animation chain

android, animation, view

Solution

You can try this

 Runnable endAction = new Runnable() {
     public void run() {
         tv.animate().x(400).y(1400).scaleX(1).scaleY(1);
     }
 };

tv.animate().x(600).y(100).scaleX(3).scaleY(3).withEndAction(endAction);

as suggested in documentation.

Problem

I'm trying this: ``` public void onClick(View view){ tv.animate().x(600).y(100).scaleX(3).scaleY(3); tv.animate().x(400).y(1400).scaleX(1).scaleY(1); } ``` but it skips the the first line of animation. How can I make it chain them so first it will do the first line and then the next?

Original source