Created
September 11, 2023 19:36
-
-
Save zurche/0880716e3b1d3ca3ccadb0cd02b310ec to your computer and use it in GitHub Desktop.
ValueView Composable
This file contains 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 | |
fun ValueView(currentValue: Float = 113.02211f, total: Float = 1356f) { | |
Column( | |
modifier = Modifier | |
.padding(start = 10.dp), | |
horizontalAlignment = Alignment.End | |
) { | |
Text( | |
text = currentValue.toString(), | |
style = MaterialTheme.typography.labelMedium, | |
fontWeight = FontWeight.Bold, | |
color = Color.Black | |
) | |
Text( | |
text = "$${total.toInt()}", | |
style = MaterialTheme.typography.labelSmall, | |
color = Color.Gray | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment