Created
May 21, 2025 05:01
-
-
Save Tonnie-Dev/c27468cac49ea383e1fdb4c36e7f75a1 to your computer and use it in GitHub Desktop.
Some
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
private fun DrawingsCounter( | |
count: Int, | |
modifier: Modifier = Modifier | |
) { | |
Box( | |
modifier = modifier | |
.padding(start = MaterialTheme.spacing.spaceTen * 2) | |
.wrapContentSize() | |
) { | |
Box( | |
modifier.background( | |
color = MaterialTheme.colorScheme.surfaceContainerLow, | |
shape = CircleShape | |
) | |
.wrapContentWidth() | |
.height(MaterialTheme.spacing.spaceSmall * 7) | |
.align(Alignment.CenterStart), | |
contentAlignment = Alignment.Center, | |
) { | |
Text( | |
modifier = Modifier.padding( | |
start = MaterialTheme.spacing.spaceLarge, | |
end = MaterialTheme.spacing.spaceTen * 2 | |
), | |
text = count.toString(), | |
style = MaterialTheme.typography.headlineXSmall.copy(color = OnBackground), | |
) | |
} | |
Image( | |
painter = painterResource(R.drawable.counter_palette), | |
contentDescription = null, | |
modifier = Modifier | |
.align(Alignment.CenterStart) | |
.offset(- (MaterialTheme.spacing.spaceTen * 2)) | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment