Is there some helper function for when you want to display a drawable resource (ID) but don’t know whether it is a vector drawable or a bitmap?
In my use case, I have a drawable resId which is sometimes overridden by a vector resource, and sometimes by a bitmap.
e
ephemient
04/30/2023, 7:29 AM
sounds #compose-android specific
ephemient
04/30/2023, 7:30 AM
painterResource()
should work with vectors and bitmaps, just not other types of drawables
ephemient
04/30/2023, 7:31 AM
if you need support for all types of drawables, there is accompanist-drawablepainter
m
Mark
04/30/2023, 7:43 AM
Thanks @ephemient So, I’ve just converted my
icon: ImageVector
args to
icon: Painter
and that seems to work well. It seems easy to convert from various image types to