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