This ... should not be so hard. I simply want to l...
# compose
j
This ... should not be so hard. I simply want to load an SVG in from a byte array but for some reason thats not possible??? I know i might need skia but none of the methods that they say exist here
solved 1
r
Skia is an implementation detail. It's the 2D rendering engine and not exposed directly.
j
is there a way to create an image vector?
r
I believe you can use
loadSvgPainter()
to load from a byte array (via an input stream), and
painterResource()
to load from a file
j
so i am trying painterResource and it just says
Copy code
val bitmap = painterResource("pause.svg")
                    Icon(bitmap, null)
image.png
pause.svg
r
If all you need is a pause icon you can use the extended set of material icons with the artifact
androidx.compose.material:material-icons-extended
j
ive been trying
i cant find it
Do you know what i need to import?
r
Are you writing an Android or a desktop app btw?
SVG is supported by desktop (afaik), not Android
j
both
im on compose multiplatform
and what the hell?
I can get like 50 svg viewers on android but they dont work with this ui framework??? the same SVG thats like everywhere?
im begenning to see why no one in an enterprise environment would give this framework the time of day
regardless, I JUST want a pause button, but for some dumb reason, this framework is making me spend hours of time JUST TO GET A PAUSE button. This is legitimately rediculous
ALRIGHT FINALLY GOT IT , ty for the help
r
Android uses something called Vector Drawables, also saved as XML files, that you can create from SVG in Android Studio
Those files are also supported by desktop
r
Damn, Romain should be awarded as the most tolerant human on earth. @John Dior Learn the basics and don't come here next time acting like an idiot. It's a public space and you should learn some basic courtesy. You made senseless remarks earlier on, he tolerated you but you have the audacity to follow it up with more piles of garbage.
❤️ 2
💯 21