File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed
Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -158,16 +158,22 @@ The property animation system is a robust framework that allows you to animate a
158158
159159以下例子同时应用5个动画:
160160
161- - 播放anim1;
162- - 同时播放anim2,anim3,anim4;
163- - 播放anim5。
161+ - Plays bounceAnim.
162+ - Plays squashAnim1, squashAnim2, stretchAnim1, and stretchAnim2 at the same time.
163+ - Plays bounceBackAnim.
164+ - Plays fadeAnim.
164165
165166```java
166167AnimatorSet bouncer = new AnimatorSet();
167- bouncer.play(anim1).before(anim2);
168- bouncer.play(anim2).with(anim3);
169- bouncer.play(anim2).with(anim4)
170- bouncer.play(anim5).after(amin2);
168+ bouncer.play(bounceAnim).before(squashAnim1);
169+ bouncer.play(squashAnim1).with(squashAnim2);
170+ bouncer.play(squashAnim1).with(stretchAnim1);
171+ bouncer.play(squashAnim1).with(stretchAnim2);
172+ bouncer.play(bounceBackAnim).after(stretchAnim2);
173+ ValueAnimator fadeAnim = ObjectAnimator.ofFloat(newBall, "alpha", 1f, 0f);
174+ fadeAnim.setDuration(250);
175+ AnimatorSet animatorSet = new AnimatorSet();
176+ animatorSet.play(bouncer).before(fadeAnim);
171177animatorSet.start();
172178```
173179
You can’t perform that action at this time.
0 commit comments