I have a file:
res/drawable/test.svg
According to this answer I should be able to use painterResource to use it in JetpackCompose: https://stackoverflow.com/a/68579605/20009330
This is what I did:
Image(
painter = painterResource(id = R.drawable.test),
contentDescription = ""
)
But when I start typing R.drawable... the IDE typeahead-suggestions don't find the .svg, they only finds the other two .xml files (ic_launcher_background, ic_launcher_foreground) <- those are there by default when I am typing my R.drawable.
The R.drawable.'test' has a red font color now
See images for how it looks in AndroidStudio: enter image description here enter image description here
Do I need to convert those .svg files to another file format, e.g. xml before I can use them?
(Note: I tried simply renaming the .svg files to .xml but then got a runtime error so I think this is not the solution.)