Skip to content

Instantly share code, notes, and snippets.

@oas004
Created December 7, 2022 22:25
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 oas004/cd5768b571d36620186e1f833ba8dbe9 to your computer and use it in GitHub Desktop.
Save oas004/cd5768b571d36620186e1f833ba8dbe9 to your computer and use it in GitHub Desktop.
val previewProgressSections = listOf(
ProgressIndicatorSegment(
weight = 3f,
indicatorColor = Color.Cyan
),
ProgressIndicatorSegment(
weight = 3f,
indicatorColor = Color.Magenta
),
ProgressIndicatorSegment(
weight = 3f,
indicatorColor = Color.Yellow
)
)
@WearSquareDevicePreview
@Composable
fun PreviewHighCornerRadius() {
Box(
modifier = Modifier
.fillMaxSize()
.background(Color.Black)
) {
SquareSegmentedProgressIndicator(
modifier = Modifier
.height(300.dp)
.width(300.dp),
progress = 0.5f,
trackSegments = previewProgressSections,
cornerRadiusDp = 50.dp
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment