Skip to content

Instantly share code, notes, and snippets.

@zurche
Created September 11, 2023 19:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zurche/0880716e3b1d3ca3ccadb0cd02b310ec to your computer and use it in GitHub Desktop.
Save zurche/0880716e3b1d3ca3ccadb0cd02b310ec to your computer and use it in GitHub Desktop.
ValueView Composable
@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