From 315c329544d7c593d1072b071cbb92d9afe74021 Mon Sep 17 00:00:00 2001 From: John Reck Date: Fri, 9 May 2014 19:21:04 -0700 Subject: Add TimeInterpolator support to RNA Bug: 14678626 Change-Id: I6554e7fcd42c49fac3618ca792083bb68e358f55 --- .../src/com/android/test/hwui/CirclePropActivity.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tests') 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) { -- cgit v1.1