diff options
author | John Reck <jreck@google.com> | 2014-05-09 19:21:04 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2014-05-12 14:41:06 -0700 |
commit | 315c329544d7c593d1072b071cbb92d9afe74021 (patch) | |
tree | b10fccc58bfb0267c049fd49d6a56dfc25c6ec23 /tests | |
parent | a9c47626975181261a409d029d24d9c893bc4717 (diff) | |
download | frameworks_base-315c329544d7c593d1072b071cbb92d9afe74021.zip frameworks_base-315c329544d7c593d1072b071cbb92d9afe74021.tar.gz frameworks_base-315c329544d7c593d1072b071cbb92d9afe74021.tar.bz2 |
Add TimeInterpolator support to RNA
Bug: 14678626
Change-Id: I6554e7fcd42c49fac3618ca792083bb68e358f55
Diffstat (limited to 'tests')
-rw-r--r-- | tests/HwAccelerationTest/src/com/android/test/hwui/CirclePropActivity.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/CirclePropActivity.java b/tests/HwAccelerationTest/src/com/android/test/hwui/CirclePropActivity.java index 5c273de..1d0a806 100644 --- a/tests/HwAccelerationTest/src/com/android/test/hwui/CirclePropActivity.java +++ b/tests/HwAccelerationTest/src/com/android/test/hwui/CirclePropActivity.java @@ -16,6 +16,7 @@ package com.android.test.hwui; +import android.animation.TimeInterpolator; import android.app.Activity; import android.content.Context; import android.graphics.Canvas; @@ -27,6 +28,8 @@ import android.os.Trace; import android.view.HardwareCanvas; import android.view.RenderNodeAnimator; import android.view.View; +import android.view.animation.AccelerateDecelerateInterpolator; +import android.view.animation.OvershootInterpolator; import android.webkit.WebChromeClient; import android.webkit.WebView; import android.webkit.WebViewClient; @@ -122,8 +125,11 @@ public class CirclePropActivity extends Activity { mPaint, RenderNodeAnimator.PAINT_STROKE_WIDTH, RenderNodeAnimator.DELTA_TYPE_ABSOLUTE, mToggle ? 5.0f : 60.0f)); + TimeInterpolator interp = new OvershootInterpolator(3.0f); for (int i = 0; i < mRunningAnimations.size(); i++) { - mRunningAnimations.get(i).start(this); + RenderNodeAnimator anim = mRunningAnimations.get(i); + anim.setInterpolator(interp); + anim.start(this); } if (mToggle) { |