Fixed
Status Update
Comments
uc...@google.com <uc...@google.com>
sp...@google.com <sp...@google.com> #2
Please attach an SVG file reproducing the problem when it is imported.
si...@gmail.com <si...@gmail.com> #3
Background image: ic_launcher_background.svg
sp...@google.com <sp...@google.com> #4
The alpha values are imported correctly from ic_launcher_background.svg in Studio 3.0 in Russian locale:
<vector xmlns:android="http://schemas.android.com/apk/res/android "
xmlns:aapt="http://schemas.android.com/aapt "
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:pathData="M0,0h108v108h-108z"
android:strokeWidth="1"
android:fillType="evenOdd"
android:strokeColor="#00000000">
<aapt:attr name="android:fillColor">
<gradient
android:startY="108"
android:startX="54"
android:endY="3.3065464E-15"
android:endX="54"
android:type="linear">
<item android:offset="0" android:color="#FF006EAA"/>
<item android:offset="1" android:color="#FF1178B0"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M0,67h109v42h-109z"
android:strokeAlpha="0.12"
android:strokeWidth="1"
android:fillColor="#FFFFFF"
android:fillType="evenOdd"
android:strokeColor="#00000000"
android:fillAlpha="0.12"/>
</vector>
Do you get a different result?
<vector xmlns:android="
xmlns:aapt="
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:pathData="M0,0h108v108h-108z"
android:strokeWidth="1"
android:fillType="evenOdd"
android:strokeColor="#00000000">
<aapt:attr name="android:fillColor">
<gradient
android:startY="108"
android:startX="54"
android:endY="3.3065464E-15"
android:endX="54"
android:type="linear">
<item android:offset="0" android:color="#FF006EAA"/>
<item android:offset="1" android:color="#FF1178B0"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M0,67h109v42h-109z"
android:strokeAlpha="0.12"
android:strokeWidth="1"
android:fillColor="#FFFFFF"
android:fillType="evenOdd"
android:strokeColor="#00000000"
android:fillAlpha="0.12"/>
</vector>
Do you get a different result?
sp...@google.com <sp...@google.com> #5
Sorry, I meant in Studio 3.1.
si...@gmail.com <si...@gmail.com> #6
See my result with commas: ResWithComma.png
sp...@google.com <sp...@google.com>
sp...@google.com <sp...@google.com> #7
The fix will be included in Studio 3.2 Canary 11.
Description
AI-173.4670197, JRE 1.8.0_152-release-1024-b02x64 JetBrains s.r.o, OS Windows 7(amd64) v6.1 Service Pack 1, screens 1920x1080, 1920x1080
Android Gradle Plugin: 3.0.1
Gradle: 4.1
NDK: from local.properties: 15.1.4119039; latest from SDK: 15.1.4119039;
LLDB: pinned revision 3.1 not found; latest from SDK: (package not found);
CMake: from local.properties: (not specified); latest from SDK: (not found); from PATH: (not found);
Windows with Russian locale uses comma as delimiter for decimal values.
So, Image Asset Studio uses comma for alpha attribute when generates vector drawable resource.
As it's not recognized as delimiter in Android Studio, alpha channel becomes lost. (See CommaSystemDelimiter.png)
If i go to windows format settings and choose english format for values (See FormatSettings.png), which uses point as delimiter for decimal values, all works fine. (See PointSystemDelimiter.png)