Just finalized feature to import Material Symbols ...
# feed
y
Just finalized feature to import Material Symbols into Compose ImageVector ❤️
🚀 5
🔥 10
K 17
s
That’s a great new feature! I import most icons from Material, so this looks like a real time-saver. Thanks for your hard work on Valykyrie!
❤️ 1
g
That's awesome, I use and love your plugin! 🤩
❤️ 1
y
You can try out feature in snapshot build 🌚 https://github.com/ComposeGears/Valkyrie/releases/tag/0.18.0-SNAPSHOT
l
Looks awesome! Just out of curiosity, is xml export possible to compose resources?
s
Why would you want that? The XML way is not performant.
Generating the code like Valklyrie does is the fastest and most efficient way to make it work. That's why you want to use that.
y
@Lukas Anda what do you mean exactly? The plugin is focusing on converting SVG/XML into Compose ImageVector 🙂
l
I always had trouble with large vectors being as a code (due to kotlin file size) compared to have it as xml, that's why I wanted to have it as a vector drawable. Or am I missing something?
s
If a graphic is too complex you may want to use a bitmap, because it hurts the performance anyways.
💯 1
y
You can read discussion about this. https://github.com/ComposeGears/Valkyrie/discussions/646 And issue: https://github.com/ComposeGears/Valkyrie/issues/648 To summarize: 1. You will not get any profit by converting complex image to vector, render will take longer compare to draw regular bitmap 2. Recommended to use raster (jpeg, png, webp) in this case (it will be drawn faster + took less memory)
☝️ 1
s
The usual Kotlin file generated by Valkyrie for Material icons is 50 to 100 lines (in total, including imports). That performs very well for me and faster as well as more memory friendly than every alternative. If your Kotlin file results in 500+ lines the SVG is just too complex.
l
Ah good to know then! Thanks