summaryrefslogtreecommitdiffstats
path: root/tests/VectorDrawableTest
diff options
context:
space:
mode:
authorztenghui <ztenghui@google.com>2014-06-17 09:54:45 -0700
committerztenghui <ztenghui@google.com>2014-06-19 10:56:28 -0700
commitcf4832f69c8786b098ce18c24319021f8cd6733a (patch)
treee8fd8df89d7ff6a9a6de5a4e9bd03ee9e88c7a8c /tests/VectorDrawableTest
parent150bfcd73d53cd824b4ab20161a3d87710ce259b (diff)
downloadframeworks_base-cf4832f69c8786b098ce18c24319021f8cd6733a.zip
frameworks_base-cf4832f69c8786b098ce18c24319021f8cd6733a.tar.gz
frameworks_base-cf4832f69c8786b098ce18c24319021f8cd6733a.tar.bz2
Add path support into xml files for PathInterpolator and ObjectAnimator.
The test case is showing that AnimatedVectorDrawable is able to use path to define time interpolator and object movement now. Change-Id: If3c0418265d0fd762c8f5f0bb8c39cce3ad34ef3
Diffstat (limited to 'tests/VectorDrawableTest')
-rw-r--r--tests/VectorDrawableTest/res/anim/trim_path_animation03.xml4
-rw-r--r--tests/VectorDrawableTest/res/anim/trim_path_animation04.xml8
-rw-r--r--tests/VectorDrawableTest/res/drawable/animation_vector_drawable01.xml3
-rw-r--r--tests/VectorDrawableTest/res/interpolator/custom_path_interpolator.xml2
4 files changed, 11 insertions, 6 deletions
diff --git a/tests/VectorDrawableTest/res/anim/trim_path_animation03.xml b/tests/VectorDrawableTest/res/anim/trim_path_animation03.xml
index 72beba2..0c1073e 100644
--- a/tests/VectorDrawableTest/res/anim/trim_path_animation03.xml
+++ b/tests/VectorDrawableTest/res/anim/trim_path_animation03.xml
@@ -21,6 +21,8 @@
android:duration="6000"
android:propertyName="rotation"
android:valueFrom="0"
- android:valueTo="360"/>
+ android:valueTo="360"
+ android:interpolator="@interpolator/custom_path_interpolator"
+ />
</set> \ No newline at end of file
diff --git a/tests/VectorDrawableTest/res/anim/trim_path_animation04.xml b/tests/VectorDrawableTest/res/anim/trim_path_animation04.xml
index ff86668..4d0aae1 100644
--- a/tests/VectorDrawableTest/res/anim/trim_path_animation04.xml
+++ b/tests/VectorDrawableTest/res/anim/trim_path_animation04.xml
@@ -16,11 +16,9 @@
-->
<set xmlns:android="http://schemas.android.com/apk/res/android" >
-
<objectAnimator
android:duration="9000"
- android:propertyName="rotation"
- android:valueFrom="0"
- android:valueTo="360"/>
-
+ android:propertyXName="translateX"
+ android:propertyYName="translateY"
+ android:pathData="m0,0 q 150, 300 150, 0 t 150, 0, t 150, 0 t -150 0 t -150 0 t -150 0 z" />
</set> \ 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 b8681b6..0900b7c 100644
--- a/tests/VectorDrawableTest/res/drawable/animation_vector_drawable01.xml
+++ b/tests/VectorDrawableTest/res/drawable/animation_vector_drawable01.xml
@@ -32,5 +32,8 @@
<target
android:name="rotationGroupBlue"
android:animation="@anim/trim_path_animation03" />
+ <target
+ android:name="rotationGroup"
+ android:animation="@anim/trim_path_animation04" />
</animated-vector> \ No newline at end of file
diff --git a/tests/VectorDrawableTest/res/interpolator/custom_path_interpolator.xml b/tests/VectorDrawableTest/res/interpolator/custom_path_interpolator.xml
new file mode 100644
index 0000000..0cffa0a
--- /dev/null
+++ b/tests/VectorDrawableTest/res/interpolator/custom_path_interpolator.xml
@@ -0,0 +1,2 @@
+<pathInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
+ android:pathData="m0,0q0.4,0.05 0.6,0.3t0.3,0.3l0.1,0.4" /> \ No newline at end of file