diff options
author | Teng-Hui Zhu <ztenghui@google.com> | 2016-03-28 16:34:53 -0700 |
---|---|---|
committer | Tenghui Zhu <ztenghui@google.com> | 2016-03-29 23:06:35 +0000 |
commit | 5339428d22fb477c79348fde7c1288a7b22e6113 (patch) | |
tree | ae0fa5fca0a2ac6f834118fdabd2fcc17e3dd450 | |
parent | af64f6341bdbca93aff3d68264af48e74faa9e58 (diff) |
Add radio button as a bundle XML file in the manual test
This will make the reproducing and isolating the bug easier b/c everything is
in one single file.
b/27343522
Change-Id: I25445127f6fb44a8613701a7195a605e052730e5
3 files changed, 210 insertions, 0 deletions
diff --git a/tests/VectorDrawableTest/res/drawable/btn_radio_on_to_off_bundle.xml b/tests/VectorDrawableTest/res/drawable/btn_radio_on_to_off_bundle.xml new file mode 100644 index 000000000000..4f05090f8b01 --- /dev/null +++ b/tests/VectorDrawableTest/res/drawable/btn_radio_on_to_off_bundle.xml @@ -0,0 +1,190 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2016 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. +--> +<animated-vector xmlns:aapt="http://schemas.android.com/aapt" + xmlns:android="http://schemas.android.com/apk/res/android"> + <aapt:attr name="android:drawable"> + <vector + android:width="32dp" + android:viewportWidth="32" + android:height="32dp" + android:viewportHeight="32"> + <group + android:name="btn_radio_to_off_mtrl_0" + android:translateX="16" + android:translateY="16"> + <group + android:name="ring_outer"> + <path + android:name="ring_outer_path" + android:strokeColor="#FF000000" + android:strokeWidth="2" + android:pathData="M 0.0,-9.0 c 4.9705627482,0.0 9.0,4.0294372518 9.0,9.0 c 0.0,4.9705627482 -4.0294372518,9.0 -9.0,9.0 c -4.9705627482,0.0 -9.0,-4.0294372518 -9.0,-9.0 c 0.0,-4.9705627482 4.0294372518,-9.0 9.0,-9.0 Z"/> + </group> + <group + android:name="dot_group"> + <path + android:name="dot_path" + android:pathData="M 0.0,-5.0 c -2.7619934082,0.0 -5.0,2.2380065918 -5.0,5.0 c 0.0,2.7619934082 2.2380065918,5.0 5.0,5.0 c 2.7619934082,0.0 5.0,-2.2380065918 5.0,-5.0 c 0.0,-2.7619934082 -2.2380065918,-5.0 -5.0,-5.0 Z" + android:fillColor="#FF000000"/> + </group> + </group> + </vector> + </aapt:attr> + <target android:name="ring_outer"> + <aapt:attr name="android:animation"> + <set + xmlns:android="http://schemas.android.com/apk/res/android" > + <set + android:ordering="sequentially" > + <objectAnimator + android:duration="183" + android:propertyName="scaleX" + android:valueFrom="1.0" + android:valueTo="0.9" + android:valueType="floatType" + android:interpolator="@android:interpolator/fast_out_slow_in" /> + <objectAnimator + android:duration="16" + android:propertyName="scaleX" + android:valueFrom="0.9" + android:valueTo="0.5" + android:valueType="floatType" + android:interpolator="@interpolator/btn_radio_to_off_mtrl_animation_interpolator_0" /> + <objectAnimator + android:duration="300" + android:propertyName="scaleX" + android:valueFrom="0.5" + android:valueTo="1.0" + android:valueType="floatType" + android:interpolator="@interpolator/btn_radio_to_off_mtrl_animation_interpolator_0" /> + </set> + <set + android:ordering="sequentially" > + <objectAnimator + android:duration="183" + android:propertyName="scaleY" + android:valueFrom="1.0" + android:valueTo="0.9" + android:valueType="floatType" + android:interpolator="@android:interpolator/fast_out_slow_in" /> + <objectAnimator + android:duration="16" + android:propertyName="scaleY" + android:valueFrom="0.9" + android:valueTo="0.5" + android:valueType="floatType" + android:interpolator="@interpolator/btn_radio_to_off_mtrl_animation_interpolator_0" /> + <objectAnimator + android:duration="300" + android:propertyName="scaleY" + android:valueFrom="0.5" + android:valueTo="1.0" + android:valueType="floatType" + android:interpolator="@interpolator/btn_radio_to_off_mtrl_animation_interpolator_0" /> + </set> + </set> + </aapt:attr> + </target> + + <target android:name="ring_outer_path"> + <aapt:attr name="android:animation"> + <set + xmlns:android="http://schemas.android.com/apk/res/android"> + <set + android:ordering="sequentially"> + <objectAnimator + android:duration="183" + android:propertyName="strokeWidth" + android:valueFrom="2.0" + android:valueTo="2.0" + android:valueType="floatType" + android:interpolator="@android:interpolator/fast_out_slow_in"/> + <objectAnimator + android:duration="16" + android:propertyName="strokeWidth" + android:valueFrom="2.0" + android:valueTo="18.0" + android:valueType="floatType" + android:interpolator="@android:interpolator/fast_out_slow_in"/> + <objectAnimator + android:duration="300" + android:propertyName="strokeWidth" + android:valueFrom="18.0" + android:valueTo="2.0" + android:valueType="floatType" + android:interpolator="@android:interpolator/fast_out_slow_in"/> + </set> + + </set> + </aapt:attr> + </target> + <target + android:name="dot_group"> + <aapt:attr name="android:animation"> + <set + xmlns:android="http://schemas.android.com/apk/res/android"> + <set + android:ordering="sequentially"> + <objectAnimator + android:duration="183" + android:propertyName="scaleX" + android:valueFrom="1.0" + android:valueTo="1.4" + android:valueType="floatType" + android:interpolator="@android:interpolator/fast_out_slow_in"/> + <objectAnimator + android:duration="16" + android:propertyName="scaleX" + android:valueFrom="1.4" + android:valueTo="0.0" + android:valueType="floatType" + android:interpolator="@android:interpolator/fast_out_slow_in"/> + <objectAnimator + android:duration="300" + android:propertyName="scaleX" + android:valueFrom="0.0" + android:valueTo="0.0" + android:valueType="floatType" + android:interpolator="@android:interpolator/fast_out_slow_in"/> + </set> + <set + android:ordering="sequentially"> + <objectAnimator + android:duration="183" + android:propertyName="scaleY" + android:valueFrom="1.0" + android:valueTo="1.4" + android:valueType="floatType" + android:interpolator="@android:interpolator/fast_out_slow_in"/> + <objectAnimator + android:duration="16" + android:propertyName="scaleY" + android:valueFrom="1.4" + android:valueTo="0.0" + android:valueType="floatType" + android:interpolator="@android:interpolator/fast_out_slow_in"/> + <objectAnimator + android:duration="300" + android:propertyName="scaleY" + android:valueFrom="0.0" + android:valueTo="0.0" + android:valueType="floatType" + android:interpolator="@android:interpolator/fast_out_slow_in"/> + </set> + </set> + </aapt:attr> + </target> +</animated-vector>
\ No newline at end of file diff --git a/tests/VectorDrawableTest/res/interpolator/btn_radio_to_off_mtrl_animation_interpolator_0.xml b/tests/VectorDrawableTest/res/interpolator/btn_radio_to_off_mtrl_animation_interpolator_0.xml new file mode 100644 index 000000000000..d3728c475d9b --- /dev/null +++ b/tests/VectorDrawableTest/res/interpolator/btn_radio_to_off_mtrl_animation_interpolator_0.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2016 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. +--> + +<pathInterpolator + xmlns:android="http://schemas.android.com/apk/res/android" + android:pathData="M 0.0,0.0 c 0.4,0.0 0.4,1.0 1.0,1.0" /> diff --git a/tests/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableTest.java b/tests/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableTest.java index 9351f63551fb..4026e5ec6bdd 100644 --- a/tests/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableTest.java +++ b/tests/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableTest.java @@ -29,6 +29,7 @@ public class AnimatedVectorDrawableTest extends Activity implements View.OnClick private static final String LOGCAT = "AnimatedVectorDrawableTest"; protected int[] icon = { + R.drawable.btn_radio_on_to_off_bundle, R.drawable.ic_rotate_2_portrait_v2_animation, R.drawable.ic_signal_airplane_v2_animation, R.drawable.ic_hourglass_animation, |