diff options
author | ztenghui <ztenghui@google.com> | 2014-09-11 14:34:20 -0700 |
---|---|---|
committer | ztenghui <ztenghui@google.com> | 2014-09-12 15:11:10 -0700 |
commit | 8490354dc651dd8f25036ef0dda7917fb33013ed (patch) | |
tree | faaea84a86e55c20dc700d5aa3b6496f97c083b3 /tests | |
parent | 38c29ca3c75b46d631992d77af858bcd82cd04e9 (diff) | |
download | frameworks_base-8490354dc651dd8f25036ef0dda7917fb33013ed.zip frameworks_base-8490354dc651dd8f25036ef0dda7917fb33013ed.tar.gz frameworks_base-8490354dc651dd8f25036ef0dda7917fb33013ed.tar.bz2 |
Add root alpha and animation to (Animated)VectorDrawable
b/17393626
Change-Id: If6a28b072f7d4bcb2b57022d86ec784f4c0d78f1
Diffstat (limited to 'tests')
4 files changed, 33 insertions, 1 deletions
diff --git a/tests/VectorDrawableTest/res/anim/trim_path_animation06.xml b/tests/VectorDrawableTest/res/anim/trim_path_animation06.xml new file mode 100644 index 0000000..1a81866 --- /dev/null +++ b/tests/VectorDrawableTest/res/anim/trim_path_animation06.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2014 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<set xmlns:android="http://schemas.android.com/apk/res/android"> + <objectAnimator + android:duration="9000" + android:propertyName="alpha" + android:valueFrom="1.0" + android:valueTo="0.0"/> + +</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 19b82ad..8b0ceda 100644 --- a/tests/VectorDrawableTest/res/drawable/animation_vector_drawable01.xml +++ b/tests/VectorDrawableTest/res/drawable/animation_vector_drawable01.xml @@ -37,5 +37,8 @@ <target android:name="rotationGroup" android:animation="@anim/trim_path_animation04" /> + <target + android:name="rootGroup" + android:animation="@anim/trim_path_animation06" /> </animated-vector>
\ No newline at end of file diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable12.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable12.xml index 2c8b751..69ae62c 100644 --- a/tests/VectorDrawableTest/res/drawable/vector_drawable12.xml +++ b/tests/VectorDrawableTest/res/drawable/vector_drawable12.xml @@ -14,10 +14,12 @@ limitations under the License. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" + android:name="rootGroup" android:height="64dp" android:width="64dp" android:viewportHeight="600" - android:viewportWidth="600" > + android:viewportWidth="600" + android:alpha="0.5" > <group android:name="rotationGroup" diff --git a/tests/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableTest.java b/tests/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableTest.java index f165cde..05bf166 100644 --- a/tests/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableTest.java +++ b/tests/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableTest.java @@ -31,6 +31,8 @@ public class AnimatedVectorDrawableTest extends Activity implements View.OnClick R.drawable.animation_vector_progress_bar, R.drawable.animation_vector_drawable_favorite, R.drawable.animation_vector_drawable01, + // Duplicate to test constant state. + R.drawable.animation_vector_drawable01, }; @Override |