diff options
| author | Chet Haase <chet@google.com> | 2010-10-14 06:59:27 -0700 |
|---|---|---|
| committer | Chet Haase <chet@google.com> | 2010-10-14 13:13:07 -0700 |
| commit | e358b47be5a1c1a775a376925ea063b51ec3a3f9 (patch) | |
| tree | 57193b5498e0451f653364e3ab86b9292893efeb /samples/ApiDemos/src/com/example/android/apis/animation/ReversingAnimation.java | |
| parent | ec8a83055a484d8cc12033808d31864068557136 (diff) | |
Updating code to use new non-generified animator APIs
Change-Id: I3023db9d1f9cb8bf98b788fce4ae2b58b182987d
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); } |
