From a95c8abb366d9c39450513335f550b56da13b30a Mon Sep 17 00:00:00 2001 From: ztenghui Date: Wed, 23 Jul 2014 09:47:50 -0700 Subject: API REVIEW: VectorDrawable - Merge and attributes all in to top-level tag - Indent attributes under in java doc. - Updata android:stroke to be android:strokeColor, likewise android:fill - Instead of android:clipToPath, make this a different clip-path tag. - Document units of the various attributes - Add example code for defining a VectorDrawable resource More than that: = Refactor the code to better support clipPath as a sub-class. = Update all the xml files to use the new attributes and clip-path tag. TODO: -- Remove clipToPath, since that should happen on build break Friday. bug:16488254 Change-Id: I6db5680ef83cb26c8f064a60fc7d6e7142974b0f --- .../res/drawable/vector_drawable01.xml | 14 ++++------ .../res/drawable/vector_drawable02.xml | 14 ++++------ .../res/drawable/vector_drawable03.xml | 19 +++++-------- .../res/drawable/vector_drawable04.xml | 31 +++++++--------------- .../res/drawable/vector_drawable05.xml | 13 +++------ .../res/drawable/vector_drawable06.xml | 30 +++++++++------------ .../res/drawable/vector_drawable07.xml | 11 +++----- .../res/drawable/vector_drawable08.xml | 15 ++++------- .../res/drawable/vector_drawable09.xml | 12 +++------ .../res/drawable/vector_drawable10.xml | 18 +++++-------- .../res/drawable/vector_drawable11.xml | 16 +++++------ .../res/drawable/vector_drawable12.xml | 24 +++++++---------- .../res/drawable/vector_drawable13.xml | 18 +++++-------- .../res/drawable/vector_drawable14.xml | 14 ++++------ .../res/drawable/vector_drawable15.xml | 14 ++++------ .../res/drawable/vector_drawable16.xml | 16 +++++------ .../res/drawable/vector_drawable17.xml | 14 ++++------ .../res/drawable/vector_drawable18.xml | 14 ++++------ .../res/drawable/vector_drawable19.xml | 14 ++++------ .../res/drawable/vector_drawable20.xml | 14 ++++------ .../res/drawable/vector_drawable21.xml | 16 +++++------ .../res/drawable/vector_drawable22.xml | 20 ++++++-------- .../res/drawable/vector_drawable23.xml | 24 +++++++---------- .../res/drawable/vector_drawable24.xml | 24 +++++++---------- .../res/drawable/vector_drawable25.xml | 24 +++++++---------- .../res/drawable/vector_drawable_favorite.xml | 12 +++------ .../res/drawable/vector_drawable_grouping_1.xml | 16 +++++------ .../res/drawable/vector_drawable_progress_bar.xml | 14 ++++------ .../res/drawable/vector_icon_create.xml | 12 +++------ .../res/drawable/vector_icon_delete.xml | 12 +++------ .../res/drawable/vector_icon_heart.xml | 12 +++------ .../res/drawable/vector_icon_schedule.xml | 10 +++---- .../res/drawable/vector_icon_settings.xml | 12 +++------ .../res/drawable/vector_test01.xml | 14 ++++------ .../res/drawable/vector_test02.xml | 14 ++++------ 35 files changed, 209 insertions(+), 362 deletions(-) (limited to 'tests/VectorDrawableTest') diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable01.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable01.xml index 3b01e029e1c7..705cc34ff62b 100644 --- a/tests/VectorDrawableTest/res/drawable/vector_drawable01.xml +++ b/tests/VectorDrawableTest/res/drawable/vector_drawable01.xml @@ -13,22 +13,18 @@ See the License for the specific language governing permissions and limitations under the License. --> - - - - - + android:viewportWidth="480" > diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable02.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable02.xml index 40f23f0c4bc1..f5d647ceaa8f 100644 --- a/tests/VectorDrawableTest/res/drawable/vector_drawable02.xml +++ b/tests/VectorDrawableTest/res/drawable/vector_drawable02.xml @@ -12,14 +12,10 @@ See the License for the specific language governing permissions and limitations under the License. --> - - - - - + android:height="64dp" android:viewportWidth="320" + android:viewportHeight="320"> diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable03.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable03.xml index cd2fd479098d..a0b0e000d09e 100644 --- a/tests/VectorDrawableTest/res/drawable/vector_drawable03.xml +++ b/tests/VectorDrawableTest/res/drawable/vector_drawable03.xml @@ -14,23 +14,17 @@ limitations under the License. --> - - - - + android:viewportWidth="7.30625" > - @@ -50,9 +44,8 @@ android:pivotX="3.65" android:pivotY="6.125" android:rotation="-30" > - - - - - + android:viewportHeight="12.25"> - - + a .001,.001 0 1,0-.002,0z"/> - + + + a 6,6 0 1,0-12,0z"/> + android:fillColor="#ff88ff"/> diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable05.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable05.xml index 673c46524243..5b1f6abba3d3 100644 --- a/tests/VectorDrawableTest/res/drawable/vector_drawable05.xml +++ b/tests/VectorDrawableTest/res/drawable/vector_drawable05.xml @@ -14,26 +14,21 @@ limitations under the License. --> - - - - + android:viewportWidth="7.30625" > - - - - + android:viewportHeight="700"> diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable07.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable07.xml index ccb0df0c9aa8..88c4a1eaea48 100644 --- a/tests/VectorDrawableTest/res/drawable/vector_drawable07.xml +++ b/tests/VectorDrawableTest/res/drawable/vector_drawable07.xml @@ -12,13 +12,10 @@ See the License for the specific language governing permissions and limitations under the License. --> - - - - + android:height="64dp" android:viewportWidth="140" + android:viewportHeight="110"> diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable08.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable08.xml index 59f745942dc7..75529e2fd4ed 100644 --- a/tests/VectorDrawableTest/res/drawable/vector_drawable08.xml +++ b/tests/VectorDrawableTest/res/drawable/vector_drawable08.xml @@ -12,22 +12,17 @@ See the License for the specific language governing permissions and limitations under the License. --> - - - - - - + android:height="64dp" android:viewportWidth="600" + android:viewportHeight="600"> diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable09.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable09.xml index 77434fca58f0..853a77000d4c 100644 --- a/tests/VectorDrawableTest/res/drawable/vector_drawable09.xml +++ b/tests/VectorDrawableTest/res/drawable/vector_drawable09.xml @@ -13,15 +13,11 @@ See the License for the specific language governing permissions and limitations under the License. --> - - - - - + android:viewportWidth="200" > diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable10.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable10.xml index df24713e3ba0..83ed194a14e4 100644 --- a/tests/VectorDrawableTest/res/drawable/vector_drawable10.xml +++ b/tests/VectorDrawableTest/res/drawable/vector_drawable10.xml @@ -14,32 +14,28 @@ See the License for the specific language governing permissions and limitations under the License. --> - - - - - + android:viewportHeight="200"> diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable11.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable11.xml index 3422bbfe9d05..b3d7d8eed349 100644 --- a/tests/VectorDrawableTest/res/drawable/vector_drawable11.xml +++ b/tests/VectorDrawableTest/res/drawable/vector_drawable11.xml @@ -13,26 +13,22 @@ See the License for the specific language governing permissions and limitations under the License. --> - - - - - + android:viewportWidth="40" > diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable12.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable12.xml index a212defb551c..2c8b75118dfe 100644 --- a/tests/VectorDrawableTest/res/drawable/vector_drawable12.xml +++ b/tests/VectorDrawableTest/res/drawable/vector_drawable12.xml @@ -13,15 +13,11 @@ See the License for the specific language governing permissions and limitations under the License. --> - - - - - + android:viewportWidth="600" > diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable13.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable13.xml index 8c946df20d5e..2468a1b303cb 100644 --- a/tests/VectorDrawableTest/res/drawable/vector_drawable13.xml +++ b/tests/VectorDrawableTest/res/drawable/vector_drawable13.xml @@ -13,28 +13,24 @@ See the License for the specific language governing permissions and limitations under the License. --> - - - - - + android:viewportWidth="600" > diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable14.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable14.xml index 8d4ca61f82ab..01e24d302288 100644 --- a/tests/VectorDrawableTest/res/drawable/vector_drawable14.xml +++ b/tests/VectorDrawableTest/res/drawable/vector_drawable14.xml @@ -13,15 +13,11 @@ See the License for the specific language governing permissions and limitations under the License. --> - - - - - + android:viewportWidth="800" > diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable15.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable15.xml index b08e157f00ca..4bab2e37898a 100644 --- a/tests/VectorDrawableTest/res/drawable/vector_drawable15.xml +++ b/tests/VectorDrawableTest/res/drawable/vector_drawable15.xml @@ -13,15 +13,11 @@ See the License for the specific language governing permissions and limitations under the License. --> - - - - - + android:viewportWidth="500" > diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable16.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable16.xml index ae85d9b14caa..107cda2ca233 100644 --- a/tests/VectorDrawableTest/res/drawable/vector_drawable16.xml +++ b/tests/VectorDrawableTest/res/drawable/vector_drawable16.xml @@ -13,25 +13,21 @@ See the License for the specific language governing permissions and limitations under the License. --> - - - - - + android:viewportWidth="200" > + android:fillColor="#FF000000"/> + android:fillColor="#FF000000"/> diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable17.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable17.xml index c28aff46cd89..801954986ab7 100644 --- a/tests/VectorDrawableTest/res/drawable/vector_drawable17.xml +++ b/tests/VectorDrawableTest/res/drawable/vector_drawable17.xml @@ -12,21 +12,17 @@ See the License for the specific language governing permissions and limitations under the License. --> - - - - - + android:height="64dp" android:viewportWidth="1200" + android:viewportHeight="600"> diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable18.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable18.xml index d7042fd0b2ba..c93bdb94f646 100644 --- a/tests/VectorDrawableTest/res/drawable/vector_drawable18.xml +++ b/tests/VectorDrawableTest/res/drawable/vector_drawable18.xml @@ -13,22 +13,18 @@ See the License for the specific language governing permissions and limitations under the License. --> - - - - - + android:viewportWidth="500" > diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable19.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable19.xml index 47a9574eb681..996b6beff8bf 100644 --- a/tests/VectorDrawableTest/res/drawable/vector_drawable19.xml +++ b/tests/VectorDrawableTest/res/drawable/vector_drawable19.xml @@ -13,15 +13,11 @@ See the License for the specific language governing permissions and limitations under the License. --> - - - - - + android:viewportWidth="1000" > diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable20.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable20.xml index b8af7e2d076c..58021446bdc5 100644 --- a/tests/VectorDrawableTest/res/drawable/vector_drawable20.xml +++ b/tests/VectorDrawableTest/res/drawable/vector_drawable20.xml @@ -13,25 +13,21 @@ See the License for the specific language governing permissions and limitations under the License. --> - - - - - + android:viewportWidth="480" > diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable21.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable21.xml index e0013e7d28dd..5626b44e4b50 100644 --- a/tests/VectorDrawableTest/res/drawable/vector_drawable21.xml +++ b/tests/VectorDrawableTest/res/drawable/vector_drawable21.xml @@ -13,25 +13,21 @@ See the License for the specific language governing permissions and limitations under the License. --> - - - - - + android:viewportWidth="200" > + android:fillColor="#FF000000"/> + android:fillColor="#FF000000"/> diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable22.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable22.xml index 8d38cb51bf42..5b40d0d07013 100644 --- a/tests/VectorDrawableTest/res/drawable/vector_drawable22.xml +++ b/tests/VectorDrawableTest/res/drawable/vector_drawable22.xml @@ -13,24 +13,20 @@ See the License for the specific language governing permissions and limitations under the License. --> - - - - - + android:viewportWidth="400" > diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable23.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable23.xml index 52acd7afed5a..6ab6ffd2b1fb 100644 --- a/tests/VectorDrawableTest/res/drawable/vector_drawable23.xml +++ b/tests/VectorDrawableTest/res/drawable/vector_drawable23.xml @@ -13,24 +13,20 @@ See the License for the specific language governing permissions and limitations under the License. --> - - - - - + android:viewportWidth="400" > @@ -75,8 +71,8 @@ diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable24.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable24.xml index c062d702f0d8..5c1ccaa03361 100644 --- a/tests/VectorDrawableTest/res/drawable/vector_drawable24.xml +++ b/tests/VectorDrawableTest/res/drawable/vector_drawable24.xml @@ -13,25 +13,21 @@ See the License for the specific language governing permissions and limitations under the License. --> - - - - - + android:viewportWidth="400" > @@ -80,8 +76,8 @@ diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable25.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable25.xml index a3f044787598..069a53154495 100644 --- a/tests/VectorDrawableTest/res/drawable/vector_drawable25.xml +++ b/tests/VectorDrawableTest/res/drawable/vector_drawable25.xml @@ -13,15 +13,11 @@ See the License for the specific language governing permissions and limitations under the License. --> - - - - - + android:viewportWidth="400" > @@ -62,7 +58,7 @@ android:translateX="100.0" android:translateY="50.0" > diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable_favorite.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable_favorite.xml index 5a66e2d4bc9f..7be49a9d9b86 100644 --- a/tests/VectorDrawableTest/res/drawable/vector_drawable_favorite.xml +++ b/tests/VectorDrawableTest/res/drawable/vector_drawable_favorite.xml @@ -13,15 +13,11 @@ See the License for the specific language governing permissions and limitations under the License. --> - - - - - + android:viewportWidth="480" > - - - - + android:viewportWidth="256" > diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable_progress_bar.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable_progress_bar.xml index f1b2996beab2..4544cae92a31 100644 --- a/tests/VectorDrawableTest/res/drawable/vector_drawable_progress_bar.xml +++ b/tests/VectorDrawableTest/res/drawable/vector_drawable_progress_bar.xml @@ -13,15 +13,11 @@ See the License for the specific language governing permissions and limitations under the License. --> - - - - - + android:viewportWidth="64" > - - - - - + android:viewportWidth="24" > diff --git a/tests/VectorDrawableTest/res/drawable/vector_icon_delete.xml b/tests/VectorDrawableTest/res/drawable/vector_icon_delete.xml index 042173ca9f9c..94c10dfd6656 100644 --- a/tests/VectorDrawableTest/res/drawable/vector_icon_delete.xml +++ b/tests/VectorDrawableTest/res/drawable/vector_icon_delete.xml @@ -13,19 +13,15 @@ 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. --> - - - - - + android:viewportWidth="24" > diff --git a/tests/VectorDrawableTest/res/drawable/vector_icon_heart.xml b/tests/VectorDrawableTest/res/drawable/vector_icon_heart.xml index 6b6f43de122b..870e508319e2 100644 --- a/tests/VectorDrawableTest/res/drawable/vector_icon_heart.xml +++ b/tests/VectorDrawableTest/res/drawable/vector_icon_heart.xml @@ -13,19 +13,15 @@ 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. --> - - - - - + android:viewportWidth="24" > diff --git a/tests/VectorDrawableTest/res/drawable/vector_icon_schedule.xml b/tests/VectorDrawableTest/res/drawable/vector_icon_schedule.xml index ba8ebcad170c..8cabca86368f 100644 --- a/tests/VectorDrawableTest/res/drawable/vector_icon_schedule.xml +++ b/tests/VectorDrawableTest/res/drawable/vector_icon_schedule.xml @@ -13,15 +13,11 @@ 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. --> - - - - - + android:viewportWidth="24" > - - - - - + android:viewportWidth="24" > diff --git a/tests/VectorDrawableTest/res/drawable/vector_test01.xml b/tests/VectorDrawableTest/res/drawable/vector_test01.xml index fc2a15c11b23..dd71ef0e88f5 100644 --- a/tests/VectorDrawableTest/res/drawable/vector_test01.xml +++ b/tests/VectorDrawableTest/res/drawable/vector_test01.xml @@ -13,23 +13,19 @@ 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. --> - - - - - + android:viewportWidth="512" > + android:fillColor="#00000000" /> \ No newline at end of file diff --git a/tests/VectorDrawableTest/res/drawable/vector_test02.xml b/tests/VectorDrawableTest/res/drawable/vector_test02.xml index 9f4abbff5d91..e4f48de862fa 100644 --- a/tests/VectorDrawableTest/res/drawable/vector_test02.xml +++ b/tests/VectorDrawableTest/res/drawable/vector_test02.xml @@ -13,23 +13,19 @@ 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. --> - - - - - + android:viewportWidth="512" > + android:fillColor="#00000000" /> \ No newline at end of file -- cgit v1.2.3-59-g8ed1b