diff options
author | John Reck <jreck@google.com> | 2014-12-09 23:49:22 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-12-09 23:49:22 +0000 |
commit | af878b91f9e3a6b17a89e98504f5c497824c7017 (patch) | |
tree | 7507b2e65a21838e1d76e7f5361beb9727f9093e /tests | |
parent | dc6b35f54e60582e6d11ee69c7bc7695cbae6269 (diff) | |
parent | 389baa395125d5ae5aac3b9d2f98457dde09da26 (diff) | |
download | frameworks_base-af878b91f9e3a6b17a89e98504f5c497824c7017.zip frameworks_base-af878b91f9e3a6b17a89e98504f5c497824c7017.tar.gz frameworks_base-af878b91f9e3a6b17a89e98504f5c497824c7017.tar.bz2 |
am 389baa39: am 7d74cb6c: am 14c43689: Merge "Fix issue with RNA destruction mid-animation" into lmp-mr1-dev
* commit '389baa395125d5ae5aac3b9d2f98457dde09da26':
Fix issue with RNA destruction mid-animation
Diffstat (limited to 'tests')
-rw-r--r-- | tests/HwAccelerationTest/src/com/android/test/hwui/RevealActivity.java | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/RevealActivity.java b/tests/HwAccelerationTest/src/com/android/test/hwui/RevealActivity.java index 256a1d4..1216fc4 100644 --- a/tests/HwAccelerationTest/src/com/android/test/hwui/RevealActivity.java +++ b/tests/HwAccelerationTest/src/com/android/test/hwui/RevealActivity.java @@ -17,12 +17,14 @@ package com.android.test.hwui; import android.animation.Animator; +import android.animation.Animator.AnimatorListener; import android.animation.AnimatorSet; import android.app.Activity; import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.os.Bundle; +import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewAnimationUtils; @@ -37,6 +39,29 @@ public class RevealActivity extends Activity implements OnClickListener { private boolean mShouldBlock; private int mIteration = 0; + private AnimatorListener mListener = new AnimatorListener() { + + @Override + public void onAnimationStart(Animator animation) { + Log.d("Reveal", "onAnimatorStart " + animation); + } + + @Override + public void onAnimationRepeat(Animator animation) { + Log.d("Reveal", "onAnimationRepeat " + animation); + } + + @Override + public void onAnimationEnd(Animator animation) { + Log.d("Reveal", "onAnimationEnd " + animation); + } + + @Override + public void onAnimationCancel(Animator animation) { + Log.d("Reveal", "onAnimationCancel " + animation); + } + }; + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -59,6 +84,8 @@ public class RevealActivity extends Activity implements OnClickListener { Animator animator = ViewAnimationUtils.createCircularReveal(view, view.getWidth() / 2, view.getHeight() / 2, 0, Math.max(view.getWidth(), view.getHeight())); + Log.d("Reveal", "Calling start..."); + animator.addListener(mListener); if (mIteration < 2) { animator.setDuration(DURATION); animator.start(); @@ -66,6 +93,7 @@ public class RevealActivity extends Activity implements OnClickListener { AnimatorSet set = new AnimatorSet(); set.playTogether(animator); set.setDuration(DURATION); + set.addListener(mListener); set.start(); } |