AnimatorSet中before与after的理解
AnimatorSet bouncer = new AnimatorSet();
bouncer.play(bounceAnim).before(squashAnim1);
bouncer.play(squashAnim1).with(squashAnim2);
bouncer.play(squashAnim1).with(stretchAnim1);
bouncer.play(squashAnim1).with(stretchAnim2);
bouncer.play(bounceBackAnim).after(stretchAnim2);
ValueAnimator fadeAnim = ObjectAnimator.ofFloat(newBall, "alpha", 1f, 0f);
fadeAnim.setDuration(250);
AnimatorSet animatorSet = new AnimatorSet();
animatorSet.play(bouncer).before(fadeAnim);
animatorSet.start();
- Plays 
bounceAnim. - Plays 
squashAnim1,squashAnim2,stretchAnim1, andstretchAnim2at the same time. - Plays 
bounceBackAnim. - Plays 
fadeAnim. 
      说明:播放bounceAnim  播放完成之后同时播放squashAnim1, squashAnim2, stretchAnim1和stretchAnim2 这四个播放完成之后播放bounceBackAnim  最后播放fadeAnim
posted on 2015-05-05 17:15 宁静致远,一览众山小 阅读(674) 评论(0) 收藏 举报
                    
                
                
            
        
浙公网安备 33010602011771号