码迷,mamicode.com
首页 > 其他好文 > 详细

AnimatorSet中before与after的理解

时间:2015-05-05 19:24:41      阅读:496      评论:0      收藏:0      [点我收藏+]

标签:

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();



  1. Plays bounceAnim.
  2. Plays squashAnim1squashAnim2stretchAnim1, and stretchAnim2 at the same time.
  3. Plays bounceBackAnim.
  4. Plays fadeAnim.

      说明:播放bounceAnim  播放完成之后同时播放squashAnim1squashAnim2stretchAnim1和stretchAnim2 这四个播放完成之后播放bounceBackAnim  最后播放fadeAnim

AnimatorSet中before与after的理解

标签:

原文地址:http://www.cnblogs.com/ZSS-Android/p/4479723.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!