From cf4832f69c8786b098ce18c24319021f8cd6733a Mon Sep 17 00:00:00 2001 From: ztenghui Date: Tue, 17 Jun 2014 09:54:45 -0700 Subject: 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 --- tests/VectorDrawableTest/res/anim/trim_path_animation03.xml | 4 +++- tests/VectorDrawableTest/res/anim/trim_path_animation04.xml | 8 +++----- .../res/drawable/animation_vector_drawable01.xml | 3 +++ .../res/interpolator/custom_path_interpolator.xml | 2 ++ 4 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 tests/VectorDrawableTest/res/interpolator/custom_path_interpolator.xml (limited to 'tests/VectorDrawableTest') 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" + /> \ 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 @@ --> - - + 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" /> \ 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 @@ + \ 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 @@ + \ No newline at end of file -- cgit v1.1