Issue
Could you please help me draw this shape as one xml file:
The thing is, I would like to have it as one drawable xml shape to be used as a background image.
Please help.
Solution
Not really an answer. Just stating that the problem was solved using a vector drawable:
Refs:
How to convert a PNG image to a SVG?
Error importing Vector Asset into Android Studio
Code Analysis Error (Unexpected namespace prefix) after upgrading Android Support Library 23.2.0
https://developer.android.com/studio/write/vector-asset-studio.html#svg
I tried importing the svg in Android studio through the vector assets tool but got numerous errors about the <svg
tag not being declared and also an error about a sudden end of file.
The thing is you are not supposed to use *.svg files in android studio.
You have to convert a, e.g. png file to an svg file and the tool you use to convert the svg to a readable xml is svg2android. There is a minimum version for the gradle dependency and some configuration to be done in the app:build.gradle
file. The app:srcCompat resource is not immediately recognisable which is why I provided the third link.
Shout out if you need further explanation.
Answered By - iOSAndroidWindowsMobileAppsDev
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.