Material Design segmented circular progress indicator.
SegmentedProgressIndicatorBinarySample
@Composable
fun SegmentedProgressIndicatorBinarySample() {
Box(
modifier =
Modifier.background(MaterialTheme.colorScheme.background)
.padding(CircularProgressIndicatorDefaults.FullScreenPadding)
.fillMaxSize()
) {
SegmentedCircularProgressIndicator(segmentCount = 5, segmentValue = { it % 2 != 0 })
}
}
SegmentedProgressIndicatorSample
@Composable
fun SegmentedProgressIndicatorSample() {
Box(
modifier =
Modifier.background(MaterialTheme.colorScheme.background)
.padding(CircularProgressIndicatorDefaults.FullScreenPadding)
.fillMaxSize()
) {
SegmentedCircularProgressIndicator(segmentCount = 5, progress = { 0.5f })
}
}
SmallSegmentedProgressIndicatorBinarySample
@Composable
fun SmallSegmentedProgressIndicatorBinarySample() {
Box(modifier = Modifier.fillMaxSize()) {
SegmentedCircularProgressIndicator(
segmentCount = 8,
segmentValue = { it % 2 != 0 },
modifier = Modifier.align(Alignment.Center).size(80.dp),
)
}
}
SmallSegmentedProgressIndicatorSample
@Composable
fun SmallSegmentedProgressIndicatorSample() {
Box(modifier = Modifier.fillMaxSize()) {
SegmentedCircularProgressIndicator(
segmentCount = 6,
progress = { 0.75f },
modifier = Modifier.align(Alignment.Center).size(80.dp),
)
}
}