summaryrefslogtreecommitdiffstats
path: root/tests/HwAccelerationTest
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2014-06-02 11:00:09 -0700
committerJohn Reck <jreck@google.com>2014-06-02 11:00:09 -0700
commitc6b3264e16f1d2b72e7f9508559981ce9970157c (patch)
tree4b9b4d78d238e04cdd5c0394b757d88276856d0a /tests/HwAccelerationTest
parent58136d02113ae768dc2cdf871a773bd34cc71583 (diff)
downloadframeworks_base-c6b3264e16f1d2b72e7f9508559981ce9970157c.zip
frameworks_base-c6b3264e16f1d2b72e7f9508559981ce9970157c.tar.gz
frameworks_base-c6b3264e16f1d2b72e7f9508559981ce9970157c.tar.bz2
Add setStartValue to RNA
Bug: 15198607 Should be good-enough for Ripples to use for pseudo-chaining support. Change-Id: Ia8666928ccb69ae401cb583751632a52bd928b63
Diffstat (limited to 'tests/HwAccelerationTest')
-rw-r--r--tests/HwAccelerationTest/src/com/android/test/hwui/CirclePropActivity.java18
1 files changed, 12 insertions, 6 deletions
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/CirclePropActivity.java b/tests/HwAccelerationTest/src/com/android/test/hwui/CirclePropActivity.java
index 5b0aa66..a81e063 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/CirclePropActivity.java
+++ b/tests/HwAccelerationTest/src/com/android/test/hwui/CirclePropActivity.java
@@ -118,19 +118,25 @@ public class CirclePropActivity extends Activity {
mRadius, mToggle ? 250.0f : 150.0f));
mRunningAnimations.add(new RenderNodeAnimator(
- mPaint, RenderNodeAnimator.PAINT_ALPHA,
- mToggle ? 64.0f : 255.0f));
-
- mRunningAnimations.add(new RenderNodeAnimator(
mPaint, RenderNodeAnimator.PAINT_STROKE_WIDTH,
mToggle ? 5.0f : 60.0f));
- TimeInterpolator interp = new OvershootInterpolator(3.0f);
+ mRunningAnimations.add(new RenderNodeAnimator(
+ mPaint, RenderNodeAnimator.PAINT_ALPHA, 64.0f));
+
+ // Will be "chained" to run after the above
+ mRunningAnimations.add(new RenderNodeAnimator(
+ mPaint, RenderNodeAnimator.PAINT_ALPHA, 255.0f));
+
for (int i = 0; i < mRunningAnimations.size(); i++) {
RenderNodeAnimator anim = mRunningAnimations.get(i);
- anim.setInterpolator(interp);
anim.setDuration(1000);
anim.setTarget(this);
+ if (i == (mRunningAnimations.size() - 1)) {
+ // "chain" test
+ anim.setStartValue(64.0f);
+ anim.setStartDelay(anim.getDuration());
+ }
anim.start();
}