From d0ebf7002fdf82af5943d2e5218ae250e0f31341 Mon Sep 17 00:00:00 2001 From: Cheryl Potter Date: Tue, 19 Apr 2016 15:59:55 -0700 Subject: [PATCH] docs: Small edits to Vector Asset Studio Support Library support b/28199128 Change-Id: I2682b4ccbad513c9b345e0662dab8cb67e75ddfa --- docs/html/tools/help/vector-asset-studio.jd | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/html/tools/help/vector-asset-studio.jd b/docs/html/tools/help/vector-asset-studio.jd index 46adb99a97b7f..bdf46ebd3e9c2 100644 --- a/docs/html/tools/help/vector-asset-studio.jd +++ b/docs/html/tools/help/vector-asset-studio.jd @@ -60,7 +60,8 @@ generate Portable Network Graphic (PNG) files (the default) or use the Support Library.

For backward-compatibility, Vector Asset Studio generates -raster images of the vector drawable. You can refer to vector assets as +raster images of the vector drawable. The vector and raster drawables are +packaged together in the APK. You can refer to vector assets as {@link android.graphics.drawable.Drawable} in Java code or @drawable in XML code; when your app runs, the corresponding vector or raster image displays automatically depending on the API level.

@@ -109,7 +110,7 @@ icons black (android:fillColor="#FF000000"). Using this approach, y that you placed in a layout, and the icon color changes to the tint color. If the icon color isn't black, the icon color might instead blend with the tint color.

-

Vector drawable support at different API levels

+

Vector drawable backward-compatibility solutions

The following table summarizes the two techniques you can use for backward-compatibility with Android 4.4 (API level 20) and lower:

@@ -118,7 +119,7 @@ backward-compatibility with Android 4.4 (API level 20) and lower:

- + @@ -127,7 +128,7 @@ backward-compatibility with Android 4.4 (API level 20) and lower:

- + @@ -147,7 +148,7 @@ backward-compatibility with Android 4.4 (API level 20) and lower:

Using vector graphics can produce a smaller APK, but the initial loading of vector graphics can take longer.

-

PNG generation for backward-compatibility

+

PNG generation

Android 5.0 (API level 21) and higher provides vector drawable support. If your app has a minimum API level that is lower, Vector Asset Studio adds the vector drawable file to your @@ -219,7 +220,7 @@ Changing the values in the code should not cause any issues, as long as they’r you want to add XML elements, you need to make sure that they’re supported based on your minimum API level.

-

Support Library for backward-compatibility

+

Support Library

This technique requires Android Support Library 23.2 or higher and Android Plugin for Gradle 2.0 or higher, and uses vector drawables only. Before using

TechniqueGraphics TypeDrawables in APK VectorDrawable XML Elements Android Plugin for Gradle Build Flags
PNG generationVector and PNGVector and raster Subset supported 1.5.0 or higher Default