2016-04-19 4 views
1

AnimatorSetsを使用して一連のアニメーションを連鎖しようとしています。AndroidのplayTogether AnimatorSet内でアニメーションセットをアニメ化する

AnimatorSet sequentialSet = new AnimatorSet(); 
sequentialSet.playSequentially(animOne, animTwo, animThree); 

AnimatorSet togetherSet = new AnimatorSet(); 
togetherSet.playTogether(sequentialSet, animFour, animFive); 
togetherSet.setDuration(ANIM_TIMEOUT); 
togetherSet.start(); 

しかし、ある何が起こる、animOneはanimFourとanimFiveと一緒にアニメーション化して、アニメーションが起こるanimThree続いanimTwo:

私はこのような何かを持っています。誰もこれを以前見たことがありますし、アニメーションanimOne、animTwo、animThreeをanimFourとanimFiveと同じ時間に実行する方法がありますか?

ありがとうございました。

答えて

1

togetherSet.setDuration(ANIM_TIMEOUT)は、その中のすべてのアニメーションの再生時間をオーバーライドしていました。私の解決策は、アニメーションごとに時間を個別に設定し、セット自体に設定しないことです。

関連する問題