Lilly
01/06/2021, 3:06 AM@Preview
is not able to preview drawables. Can s.o. confirm that? Is this a known bug?
ListItem(
text = { Text("") },
icon = { Icon(vectorResource(id = iconRes)) }, // can not be previewed
)
While iconRes
is a png file.
EDIT: Sorry, wasn't aware of imageResource
. Now it works.Nader Jawad
01/06/2021, 7:36 AMpainterResource
API that opaquely loads pngs or vector assets and returns a Painter that can be used as input to the Icon composable