can we decode Vector assets with `+imageResource(R...
# compose
k
can we decode Vector assets with
+imageResource(R.drawable.ic_face_primary_24dp)
? The method fails to generate the bitmap and throws
IllegalArgumentException("Problem decoding into existing bitmap")
I am not sure if I mess up or we can only decode Bitmaps atm
j
I believe the function you are looking for is:
+vectorResource(R.drawable.ic_face_primary_24dp)
It is generally considered best practice to avoid converting vectors into bitmaps whenever possible.
k
Thanks Jim! 👍 that was the one I was looking for 🙂