Sheroz Nazhmudinov
04/03/2020, 7:45 PMRow(modifier = Modifier.fillMaxHeight() + Modifier.fillMaxWidth()) {
if (stateChecked.value) {
VectorPainter(asset = vectorResource(id = R.drawable.ic_checkbox_on))
} else {
VectorPainter(asset = vectorResource(id = R.drawable.ic_checkbox_off))
}
}
However, it doesn’t show anything on the screen. Is that approach correct, at all?kartoffelsup
04/03/2020, 7:48 PMIcon(asset = VectorResource(R.drawable.ic_outline_menu_24))
as suggested in this thread: https://kotlinlang.slack.com/archives/CJLTWPH7S/p1584849322105100Sheroz Nazhmudinov
04/03/2020, 7:50 PMAdam Powell
04/03/2020, 7:59 PMModifier.fillMaxHeight() + Modifier.fillMaxWidth()
as
Modifier.fillMaxHeight()
.fillMaxWidth()
now 🙂Modifier.fillMaxSize()
)Sheroz Nazhmudinov
04/03/2020, 8:00 PMSocheat KHAUV
04/07/2020, 9:22 AMBox(gravity = ContentGravity.Center, modifier = Modifier.fillMaxSize()) {
Icon(asset = vectorResource(R.drawable.ic_favorite))
}
kartoffelsup
04/07/2020, 8:25 PMModifier.preferredSize(60.dp, 60.dp)