我试图用AnimatorSets链接一组动画。
我有这样的事情:
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一起动画,然后是animTwo动画,然后是animThree动画。有没有人见过这种情况,有没有办法让动画animOne,animTwo,animThree在animFour和animFive的同时执行?
谢谢你的帮助。
发布于 2016-04-19 22:00:21
问题是togetherSet.setDuration(ANIM_TIMEOUT)正在覆盖所有动画的持续时间。我的解决方案是为每个动画分别设置持续时间,而不是在集合本身上设置它。
https://stackoverflow.com/questions/36706708
复制相似问题