svenjacobs
04/12/2024, 6:48 AMsvenjacobs
04/12/2024, 6:50 AMStylianos Gakis
04/12/2024, 6:56 AMsvenjacobs
04/12/2024, 6:57 AMCanvas
?Stylianos Gakis
04/12/2024, 6:59 AMsvenjacobs
04/12/2024, 6:59 AMAlbert Chang
04/12/2024, 9:55 AMAlbert Chang
04/12/2024, 9:56 AMStylianos Gakis
04/12/2024, 10:17 AMsvenjacobs
04/12/2024, 10:57 AMStylianos Gakis
04/12/2024, 11:13 AMRow(
horizontalArrangement = Arrangement.SpaceBetween,
modifier = Modifier.fillMaxWidth().graphicsLayer(compositingStrategy = CompositingStrategy.Offscreen)
.drawWithContent {
drawContent()
val cornerRadius = CornerRadius(size.height / 2)
// Overwrite text color
val progressPercentage = 0.1f
drawRoundRect(
color = Color.White,
size = Size(size.width * progressPercentage, size.height),
cornerRadius = cornerRadius,
blendMode = BlendMode.SrcIn
)
// Draw green background
drawRoundRect(
color = Color(0xFF008528),
size = Size(size.width * progressPercentage, size.height),
cornerRadius = cornerRadius,
blendMode = BlendMode.DstOver
)
// Draw gray background
drawRoundRect(
color = Color(0xFFD7DBE0),
cornerRadius = cornerRadius,
blendMode = BlendMode.DstOver
)
}
) {
Text(
text = "12345",
fontWeight = FontWeight.Bold,
color = Color(0xFF404B5B),
modifier = Modifier.padding(horizontal = 16.dp, vertical = 8.dp)
)
Text(
text = "67890",
fontWeight = FontWeight.Bold,
color = Color(0xFF404B5B),
modifier = Modifier.padding(horizontal = 16.dp, vertical = 8.dp)
)
}
Stylianos Gakis
04/12/2024, 11:13 AM