diff --git a/tests/VectorDrawableTest/res/anim/animation_favorite.xml b/tests/VectorDrawableTest/res/anim/animation_favorite.xml
new file mode 100644
index 0000000000000..c81ba40684f7d
--- /dev/null
+++ b/tests/VectorDrawableTest/res/anim/animation_favorite.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/VectorDrawableTest/res/anim/animation_favorite02.xml b/tests/VectorDrawableTest/res/anim/animation_favorite02.xml
new file mode 100644
index 0000000000000..15d3b8eb530e9
--- /dev/null
+++ b/tests/VectorDrawableTest/res/anim/animation_favorite02.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/VectorDrawableTest/res/anim/animation_grouping_1_01.xml b/tests/VectorDrawableTest/res/anim/animation_grouping_1_01.xml
new file mode 100644
index 0000000000000..8d82d05c27f7e
--- /dev/null
+++ b/tests/VectorDrawableTest/res/anim/animation_grouping_1_01.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/VectorDrawableTest/res/anim/animation_grouping_1_02.xml b/tests/VectorDrawableTest/res/anim/animation_grouping_1_02.xml
new file mode 100644
index 0000000000000..ae63203184c21
--- /dev/null
+++ b/tests/VectorDrawableTest/res/anim/animation_grouping_1_02.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/VectorDrawableTest/res/anim/trim_path_animation_progress_bar.xml b/tests/VectorDrawableTest/res/anim/trim_path_animation_progress_bar.xml
new file mode 100644
index 0000000000000..f510256a2e449
--- /dev/null
+++ b/tests/VectorDrawableTest/res/anim/trim_path_animation_progress_bar.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/VectorDrawableTest/res/drawable/animation_vector_drawable01.xml b/tests/VectorDrawableTest/res/drawable/animation_vector_drawable01.xml
index b37b19fb254e9..19b82adcc143d 100644
--- a/tests/VectorDrawableTest/res/drawable/animation_vector_drawable01.xml
+++ b/tests/VectorDrawableTest/res/drawable/animation_vector_drawable01.xml
@@ -19,14 +19,12 @@
-
-
@@ -40,4 +38,4 @@
android:name="rotationGroup"
android:animation="@anim/trim_path_animation04" />
-
+
\ No newline at end of file
diff --git a/tests/VectorDrawableTest/res/drawable/animation_vector_drawable_favorite.xml b/tests/VectorDrawableTest/res/drawable/animation_vector_drawable_favorite.xml
new file mode 100644
index 0000000000000..9d8381fd5e622
--- /dev/null
+++ b/tests/VectorDrawableTest/res/drawable/animation_vector_drawable_favorite.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/VectorDrawableTest/res/drawable/animation_vector_drawable_grouping_1.xml b/tests/VectorDrawableTest/res/drawable/animation_vector_drawable_grouping_1.xml
new file mode 100644
index 0000000000000..4a7e4f6d870f6
--- /dev/null
+++ b/tests/VectorDrawableTest/res/drawable/animation_vector_drawable_grouping_1.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/VectorDrawableTest/res/drawable/animation_vector_progress_bar.xml b/tests/VectorDrawableTest/res/drawable/animation_vector_progress_bar.xml
new file mode 100644
index 0000000000000..6621e41adfd57
--- /dev/null
+++ b/tests/VectorDrawableTest/res/drawable/animation_vector_progress_bar.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable_favorite.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable_favorite.xml
new file mode 100644
index 0000000000000..c8840f56a6b90
--- /dev/null
+++ b/tests/VectorDrawableTest/res/drawable/vector_drawable_favorite.xml
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable_grouping_1.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable_grouping_1.xml
new file mode 100644
index 0000000000000..558de94375a09
--- /dev/null
+++ b/tests/VectorDrawableTest/res/drawable/vector_drawable_grouping_1.xml
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable_progress_bar.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable_progress_bar.xml
new file mode 100644
index 0000000000000..956c600322dee
--- /dev/null
+++ b/tests/VectorDrawableTest/res/drawable/vector_drawable_progress_bar.xml
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/VectorDrawableTest/res/interpolator/custom_path_interpolator_favorite.xml b/tests/VectorDrawableTest/res/interpolator/custom_path_interpolator_favorite.xml
new file mode 100644
index 0000000000000..935d5b5ef2208
--- /dev/null
+++ b/tests/VectorDrawableTest/res/interpolator/custom_path_interpolator_favorite.xml
@@ -0,0 +1,2 @@
+
\ No newline at end of file
diff --git a/tests/VectorDrawableTest/res/interpolator/custom_path_interpolator_grouping_1_01.xml b/tests/VectorDrawableTest/res/interpolator/custom_path_interpolator_grouping_1_01.xml
new file mode 100644
index 0000000000000..8c57395e04953
--- /dev/null
+++ b/tests/VectorDrawableTest/res/interpolator/custom_path_interpolator_grouping_1_01.xml
@@ -0,0 +1,2 @@
+
\ No newline at end of file
diff --git a/tests/VectorDrawableTest/res/interpolator/trim_end_interpolator.xml b/tests/VectorDrawableTest/res/interpolator/trim_end_interpolator.xml
new file mode 100644
index 0000000000000..b2770cdf00d1c
--- /dev/null
+++ b/tests/VectorDrawableTest/res/interpolator/trim_end_interpolator.xml
@@ -0,0 +1,2 @@
+
\ No newline at end of file
diff --git a/tests/VectorDrawableTest/res/interpolator/trim_start_interpolator.xml b/tests/VectorDrawableTest/res/interpolator/trim_start_interpolator.xml
new file mode 100644
index 0000000000000..798f7e669b491
--- /dev/null
+++ b/tests/VectorDrawableTest/res/interpolator/trim_start_interpolator.xml
@@ -0,0 +1,2 @@
+
\ No newline at end of file
diff --git a/tests/VectorDrawableTest/res/values/strings.xml b/tests/VectorDrawableTest/res/values/strings.xml
index 6ae3d7fec91f5..54cffa87d83c0 100644
--- a/tests/VectorDrawableTest/res/values/strings.xml
+++ b/tests/VectorDrawableTest/res/values/strings.xml
@@ -1,5 +1,6 @@
-
- "M 0,0 v 100 M 0,0 h 100"
- "M300,70 l 0,-70 70,70 0,0 -70,70z"
- "M300,70 l 0,-70 70,0 0,140 -70,0 z"
+ "M 0,0 v 100 M 0,0 h 100"
+ "M300,70 l 0,-70 70,70 0,0 -70,70z"
+ "M300,70 l 0,-70 70,0 0,140 -70,0 z"
+ "M300,70 l 0,-70 70,0 0,70z M300,70 l 70,0 0,70 -70,0z"
+ "M300,35 l 0,-35 70,0 0,35z M300,105 l 70,0 0,35 -70,0z"
+ "m2.10001,-6c-1.9551,0 -0.5,0.02499 -2.10001,0.02499c-1.575,0 0.0031,-0.02499 -1.95,-0.02499c-2.543,0 -4,2.2816 -4,4.85001c0,3.52929 0.25,6.25 5.95,6.25c5.7,0 6,-2.72071 6,-6.25c0,-2.56841 -1.35699,-4.85001 -3.89999,-4.85001"
+ "m4.5,-7c-1.95509,0 -3.83009,1.26759 -4.5,3c-0.66991,-1.73241 -2.54691,-3 -4.5,-3c-2.543,0 -4.5,1.93159 -4.5,4.5c0,3.5293 3.793,6.2578 9,11.5c5.207,-5.2422 9,-7.9707 9,-11.5c0,-2.56841 -1.957,-4.5 -4.5,-4.5"
- "M300,70 l 0,-70 70,0 0,70z M300,70 l 70,0 0,70 -70,0z"
- "M300,35 l 0,-35 70,0 0,35z M300,105 l 70,0 0,35 -70,0z"
-
-
+
\ No newline at end of file
diff --git a/tests/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableTest.java b/tests/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableTest.java
index 6e864fa4722f9..b1ba0ddcddb41 100644
--- a/tests/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableTest.java
+++ b/tests/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableTest.java
@@ -19,24 +19,43 @@ import android.graphics.drawable.AnimatedVectorDrawable;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
+import android.widget.GridLayout;
+import android.widget.ScrollView;
-public class AnimatedVectorDrawableTest extends Activity {
- private static final String LOGCAT = "VectorDrawableAnimationTest";
+public class AnimatedVectorDrawableTest extends Activity implements View.OnClickListener{
+ private static final String LOGCAT = "AnimatedVectorDrawableTest";
+
+ protected int[] icon = {
+ R.drawable.animation_vector_drawable_grouping_1,
+ R.drawable.animation_vector_progress_bar,
+ R.drawable.animation_vector_drawable_favorite,
+ R.drawable.animation_vector_drawable01,
+ };
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- Button button = new Button(this);
- button.setBackgroundResource(R.drawable.animation_vector_drawable01);
- button.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- AnimatedVectorDrawable frameAnimation = (AnimatedVectorDrawable) v.getBackground();
- frameAnimation.start();
- }
- });
+ ScrollView scrollView = new ScrollView(this);
+ GridLayout container = new GridLayout(this);
+ scrollView.addView(container);
+ container.setColumnCount(1);
- setContentView(button);
+ for (int i = 0; i < icon.length; i++) {
+ Button button = new Button(this);
+ button.setWidth(400);
+ button.setHeight(400);
+ button.setBackgroundResource(icon[i]);
+ container.addView(button);
+ button.setOnClickListener(this);
+ }
+
+ setContentView(scrollView);
+ }
+
+ @Override
+ public void onClick(View v) {
+ AnimatedVectorDrawable d = (AnimatedVectorDrawable) v.getBackground();
+ d.start();
}
}