Florian
08/21/2021, 11:39 AMSpacer
with the size of an Icon
but there doesn't seem to be adDefault value for this (like we have for many other standard composables). So what should I use here?
Icon(
Icons.Default.Check,
contentDescription = stringResource(R.string.task_completed),
tint = MaterialTheme.colors.primary,
)
Dominaezzz
08/21/2021, 12:07 PMFlorian
08/21/2021, 12:07 PMDominaezzz
08/21/2021, 12:08 PMDominaezzz
08/21/2021, 12:08 PMDominaezzz
08/21/2021, 12:08 PMModifier.onSizeChanged
to remember the size, then you can create a spacer using it. (That's what I do in my app)Florian
08/21/2021, 12:10 PMDominaezzz
08/21/2021, 12:13 PMModifier.drawWithContent
) (Idk which approach is better)Florian
08/21/2021, 12:17 PMFlorian
08/21/2021, 12:17 PMFlorian
08/21/2021, 12:18 PMFlorian
08/21/2021, 12:18 PMDominaezzz
08/21/2021, 12:19 PMSergey Y.
08/21/2021, 12:28 PMdrawWithContent
modifier, inside lambda block just call function drawContent
under your visibility condition.Louis Pullen-Freilich [G]
08/21/2021, 12:51 PMFlorian
08/21/2021, 3:06 PM