Vaios Tsitsonis
02/24/2022, 2:57 PMImage(
painter = painterResource(id = someId),
contentDescription = null
)
but i get this error: Only VectorDrawables and rasterized asset types are supported ex. PNG, JPG
. I can load vector drawables so I suppose that I need to load layer-list differently... How is this possible?mattinger
02/25/2022, 12:20 AM@Composable
fun loadXmlDrawable(@DrawableRes resId: Int): ImageBitmap? =
ContextCompat.getDrawable(
LocalContext.current,
resId
)?.toBitmap()?.asImageBitmap()
mattinger
02/25/2022, 12:21 AMmattinger
02/25/2022, 12:22 AMmattinger
02/25/2022, 12:22 AMChris Sinco [G]
02/26/2022, 1:35 AMNader Jawad
02/26/2022, 2:18 AMVaios Tsitsonis
03/01/2022, 6:22 AMloadXmlDrawable
, but probably this is the solution. Thank you very much all of you! :)