diff options
Diffstat (limited to 'samples/ApiDemos/src/com/example/android/apis/animation/AnimationSeeking.java')
| -rw-r--r-- | samples/ApiDemos/src/com/example/android/apis/animation/AnimationSeeking.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/samples/ApiDemos/src/com/example/android/apis/animation/AnimationSeeking.java b/samples/ApiDemos/src/com/example/android/apis/animation/AnimationSeeking.java index 8307d60c0..b62174a91 100644 --- a/samples/ApiDemos/src/com/example/android/apis/animation/AnimationSeeking.java +++ b/samples/ApiDemos/src/com/example/android/apis/animation/AnimationSeeking.java @@ -112,8 +112,8 @@ public class AnimationSeeking extends Activity { private void createAnimation() { if (bounceAnim == null) { - bounceAnim = new ObjectAnimator(1500, ball, "y", - ball.getY(), getHeight() - BALL_SIZE); + bounceAnim = ObjectAnimator.ofFloat(ball, "y", + ball.getY(), getHeight() - BALL_SIZE).setDuration(1500); bounceAnim.setInterpolator(new BounceInterpolator()); bounceAnim.addUpdateListener(this); } |
