summaryrefslogtreecommitdiffstats
path: root/tests/VectorDrawableTest
diff options
context:
space:
mode:
authorztenghui <ztenghui@google.com>2014-05-28 09:48:36 -0700
committerztenghui <ztenghui@google.com>2014-05-28 13:22:44 -0700
commit452f6ece7fe2fd1a85fca53f54e90bf041083b21 (patch)
tree11d47985f5cc7ebba385e02043202cb388152841 /tests/VectorDrawableTest
parent63cfd85bcce488a3f3952bd1db523a727d30ca39 (diff)
downloadframeworks_base-452f6ece7fe2fd1a85fca53f54e90bf041083b21.zip
frameworks_base-452f6ece7fe2fd1a85fca53f54e90bf041083b21.tar.gz
frameworks_base-452f6ece7fe2fd1a85fca53f54e90bf041083b21.tar.bz2
Add translation and scale to the group tag and related tests.
bug:15288554 Change-Id: Iebe176d0a9c2c566d1910674a068e65e15569829
Diffstat (limited to 'tests/VectorDrawableTest')
-rw-r--r--tests/VectorDrawableTest/res/drawable/vector_drawable01.xml3
-rw-r--r--tests/VectorDrawableTest/res/drawable/vector_drawable16.xml19
-rw-r--r--tests/VectorDrawableTest/res/drawable/vector_drawable21.xml51
-rw-r--r--tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawablePerformance.java3
4 files changed, 72 insertions, 4 deletions
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable01.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable01.xml
index d0f2a2d..66a9452 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable01.xml
+++ b/tests/VectorDrawableTest/res/drawable/vector_drawable01.xml
@@ -13,8 +13,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:versionCode="1" >
+<vector xmlns:android="http://schemas.android.com/apk/res/android">
<size
android:height="48dp"
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable16.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable16.xml
index bbff833..ae85d9b 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable16.xml
+++ b/tests/VectorDrawableTest/res/drawable/vector_drawable16.xml
@@ -25,7 +25,24 @@
<group>
<path
- android:name="house"
+ android:name="background1"
+ android:pathData="M 0,0 l 100,0 l 0, 100 l -100, 0 z"
+ android:fill="#FF000000"/>
+ <path
+ android:name="background2"
+ android:pathData="M 100,100 l 100,0 l 0, 100 l -100, 0 z"
+ android:fill="#FF000000"/>
+ </group>
+ <group
+ android:pivotX="100"
+ android:pivotY="100"
+ android:rotation="90"
+ android:scaleX="0.75"
+ android:scaleY="0.5"
+ android:translateX="0.0"
+ android:translateY="100.0">
+ <path
+ android:name="twoLines"
android:pathData="M 100,10 v 90 M 10,100 h 90"
android:stroke="#FF00FF00"
android:strokeWidth="10" />
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable21.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable21.xml
new file mode 100644
index 0000000..e0013e7
--- /dev/null
+++ b/tests/VectorDrawableTest/res/drawable/vector_drawable21.xml
@@ -0,0 +1,51 @@
+<!--
+ 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android" >
+
+ <size
+ android:height="64dp"
+ android:width="64dp" />
+
+ <viewport
+ android:viewportHeight="200"
+ android:viewportWidth="200" />
+
+ <group>
+ <path
+ android:name="background1"
+ android:pathData="M 0,0 l 100,0 l 0, 100 l -100, 0 z"
+ android:fill="#FF000000"/>
+ <path
+ android:name="background2"
+ android:pathData="M 100,100 l 100,0 l 0, 100 l -100, 0 z"
+ android:fill="#FF000000"/>
+ </group>
+ <group
+ android:pivotX="0"
+ android:pivotY="0"
+ android:rotation="90"
+ android:scaleX="0.75"
+ android:scaleY="0.5"
+ android:translateX="100.0"
+ android:translateY="100.0">
+ <path
+ android:name="twoLines"
+ android:pathData="M 100,10 v 90 M 10,100 h 90"
+ android:stroke="#FF00FF00"
+ android:strokeWidth="10" />
+ </group>
+
+</vector> \ No newline at end of file
diff --git a/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawablePerformance.java b/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawablePerformance.java
index dcc7769..e0624e5 100644
--- a/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawablePerformance.java
+++ b/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawablePerformance.java
@@ -47,7 +47,8 @@ public class VectorDrawablePerformance extends Activity {
R.drawable.vector_drawable17,
R.drawable.vector_drawable18,
R.drawable.vector_drawable19,
- R.drawable.vector_drawable20
+ R.drawable.vector_drawable20,
+ R.drawable.vector_drawable21
};
@Override