summaryrefslogtreecommitdiffstats
path: root/tests/VectorDrawableTest/src
diff options
context:
space:
mode:
Diffstat (limited to 'tests/VectorDrawableTest/src')
-rw-r--r--tests/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableTest.java23
-rw-r--r--tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawablePerformance.java4
2 files changed, 27 insertions, 0 deletions
diff --git a/tests/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableTest.java b/tests/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableTest.java
index ecc7782..56c8119 100644
--- a/tests/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableTest.java
+++ b/tests/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableTest.java
@@ -14,9 +14,12 @@
package com.android.test.dynamic;
+import android.animation.Animator;
+import android.animation.Animator.AnimatorListener;
import android.app.Activity;
import android.graphics.drawable.AnimatedVectorDrawable;
import android.os.Bundle;
+import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.GridLayout;
@@ -52,6 +55,26 @@ public class AnimatedVectorDrawableTest extends Activity implements View.OnClick
button.setWidth(400);
button.setHeight(400);
button.setBackgroundResource(icon[i]);
+ AnimatedVectorDrawable d = (AnimatedVectorDrawable) button.getBackground();
+ d.addListener(new AnimatorListener() {
+ @Override
+ public void onAnimationStart(Animator animation) {
+ Log.v(LOGCAT, "Animator start");
+ }
+ @Override
+ public void onAnimationRepeat(Animator animation) {
+ Log.v(LOGCAT, "Animator repeat");
+ }
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ Log.v(LOGCAT, "Animator end");
+ }
+ @Override
+ public void onAnimationCancel(Animator animation) {
+ Log.v(LOGCAT, "Animator cancel");
+ }
+ });
+
container.addView(button);
button.setOnClickListener(this);
}
diff --git a/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawablePerformance.java b/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawablePerformance.java
index d029050..b4a93f6 100644
--- a/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawablePerformance.java
+++ b/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawablePerformance.java
@@ -65,6 +65,10 @@ public class VectorDrawablePerformance extends Activity {
R.drawable.vector_drawable28,
R.drawable.vector_drawable29,
R.drawable.vector_drawable30,
+ R.drawable.vector_drawable_scale0,
+ R.drawable.vector_drawable_scale1,
+ R.drawable.vector_drawable_scale2,
+ R.drawable.vector_drawable_scale3,
};
public static VectorDrawable create(Resources resources, int rid) {