我想在一个视图上运行多个AnimatorSet。AnimatorSet应该一个接一个地运行。我想做到这一点,而不使用处理程序的时间延迟。我该怎么做呢?
发布于 2017-09-05 06:48:58
在你的代码中试试这个。
AnimatorSet bouncer = new AnimatorSet();
ObjectAnimator anim = ObjectAnimator.ofFloat(mTextView, "rotationX", 0f, 180f);
anim.setDuration(2000);
ObjectAnimator anim2 = ObjectAnimator.ofFloat(mTextView, "rotationX", 180f, 0f);
anim2.setDuration(2000);
ObjectAnimator anim3 = ObjectAnimator.ofFloat(mTextView, "rotationY", 0f, 180f);
anim3.setDuration(2000);
ObjectAnimator anim4 = ObjectAnimator.ofFloat(mTextView, "rotationY", 180f, 0f);
anim4.setDuration(2000);
bouncer.playSequentially(anim, anim2, anim3, anim4);
bouncer.start();Note
方法:
https://stackoverflow.com/questions/46048176
复制相似问题