# SegmentedCircularProgressIndicator

## Functions summary

|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/SegmentedCircularProgressIndicator.composable#SegmentedCircularProgressIndicator(kotlin.Int,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Float,kotlin.Float,androidx.wear.compose.material3.ProgressIndicatorColors,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,kotlin.Boolean)( segmentCount: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 1) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, segmentValue: (segmentIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier, startAngle: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, endAngle: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, colors: https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/ProgressIndicatorColors, strokeWidth: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, gapSize: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` Material Design segmented circular progress indicator. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/SegmentedCircularProgressIndicator.composable#SegmentedCircularProgressIndicator(kotlin.Int,kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.Float,kotlin.Float,androidx.wear.compose.material3.ProgressIndicatorColors,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,kotlin.Boolean)( segmentCount: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 1) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, progress: () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier, allowProgressOverflow: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, startAngle: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, endAngle: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, colors: https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/ProgressIndicatorColors, strokeWidth: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, gapSize: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` Material Design segmented circular progress indicator. |

## Functions

### SegmentedCircularProgressIndicator

Artifact: [androidx.wear.compose:compose-material3](https://developer.android.com/jetpack/androidx/releases/wear-compose) [View Source](https://cs.android.com/search?q=file:androidx/wear/compose/material3/SegmentedCircularProgressIndicator.kt+function:SegmentedCircularProgressIndicator)

```
@Composable
fun SegmentedCircularProgressIndicator(
    segmentCount: @IntRange(from = 1) Int,
    segmentValue: (segmentIndex: Int) -> Boolean,
    modifier: Modifier = Modifier,
    startAngle: Float = CircularProgressIndicatorDefaults.StartAngle,
    endAngle: Float = startAngle,
    colors: ProgressIndicatorColors = ProgressIndicatorDefaults.colors(),
    strokeWidth: Dp = CircularProgressIndicatorDefaults.largeStrokeWidth,
    gapSize: Dp = CircularProgressIndicatorDefaults.calculateRecommendedGapSize(strokeWidth),
    enabled: Boolean = true
): Unit
```

Material Design segmented circular progress indicator.

A segmented variant of `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/CircularProgressIndicator.composable#CircularProgressIndicator(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.Boolean,kotlin.Float,kotlin.Float,androidx.wear.compose.material3.ProgressIndicatorColors,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)` that is divided into equally sized segments. This overload of `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/SegmentedCircularProgressIndicator.composable#SegmentedCircularProgressIndicator(kotlin.Int,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Float,kotlin.Float,androidx.wear.compose.material3.ProgressIndicatorColors,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,kotlin.Boolean)` allows for each segment to be individually indicated as completed, such as for showing activity for intervals within a longer period

Example of `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/SegmentedCircularProgressIndicator.composable#SegmentedCircularProgressIndicator(kotlin.Int,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Float,kotlin.Float,androidx.wear.compose.material3.ProgressIndicatorColors,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,kotlin.Boolean)` where the segments are turned on/off:

```kotlin
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.ui.Modifier
import androidx.wear.compose.material3.CircularProgressIndicator
import androidx.wear.compose.material3.CircularProgressIndicatorDefaults
import androidx.wear.compose.material3.MaterialTheme
import androidx.wear.compose.material3.ProgressIndicatorDefaults
import androidx.wear.compose.material3.SegmentedCircularProgressIndicator

Box(
    modifier =
        Modifier.background(MaterialTheme.colorScheme.background)
            .padding(CircularProgressIndicatorDefaults.FullScreenPadding)
            .fillMaxSize()
) {
    SegmentedCircularProgressIndicator(segmentCount = 5, segmentValue = { it % 2 != 0 })
}
```

![SegmentedProgressIndicatorBinarySample Composite
Image](https://developer.android.com/wear/images/design/WearComposeM3_SegmentedProgressIndicatorBinarySample_CompositeImage.png)

Example of smaller size `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/SegmentedCircularProgressIndicator.composable#SegmentedCircularProgressIndicator(kotlin.Int,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Float,kotlin.Float,androidx.wear.compose.material3.ProgressIndicatorColors,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,kotlin.Boolean)`:

```kotlin
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.size
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import androidx.wear.compose.material3.CircularProgressIndicator
import androidx.wear.compose.material3.SegmentedCircularProgressIndicator

Box(modifier = Modifier.fillMaxSize()) {
    SegmentedCircularProgressIndicator(
        segmentCount = 8,
        segmentValue = { it % 2 != 0 },
        modifier = Modifier.align(Alignment.Center).size(80.dp),
    )
}
```

![SmallSegmentedProgressIndicatorBinarySample Composite
Image](https://developer.android.com/wear/images/design/WearComposeM3_SmallSegmentedProgressIndicatorBinarySample_CompositeImage.png)

| Parameters |
|---|---|
| `segmentCount: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 1) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Number of equal segments that the progress indicator should be divided into. Has to be a number equal or greater to 1. |
| `segmentValue: (segmentIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | A function that for each segment between 1..`https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/package-summary#SegmentedCircularProgressIndicator(kotlin.Int,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Float,kotlin.Float,androidx.wear.compose.material3.ProgressIndicatorColors,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,kotlin.Boolean)` returns true if this segment should be displayed with the indicator color to show progress, and false if the segment should be displayed with the track color. |
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier = Modifier` | Modifier to be applied to the SegmentedCircularProgressIndicator. |
| `startAngle: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = CircularProgressIndicatorDefaults.StartAngle` | The starting position of the progress arc, measured clockwise in degrees (0 to 360) from the 3 o'clock position. For example, 0 and 360 represent 3 o'clock, 90 and 180 represent 6 o'clock and 9 o'clock respectively. Default is 270 degrees `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/CircularProgressIndicatorDefaults#StartAngle()` (top of the screen). |
| `endAngle: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = startAngle` | The ending position of the progress arc, measured clockwise in degrees (0 to 360) from the 3 o'clock position. For example, 0 and 360 represent 3 o'clock, 90 and 180 represent 6 o'clock and 9 o'clock respectively. By default equal to `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/package-summary#SegmentedCircularProgressIndicator(kotlin.Int,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Float,kotlin.Float,androidx.wear.compose.material3.ProgressIndicatorColors,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,kotlin.Boolean)`. |
| `colors: https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/ProgressIndicatorColors = ProgressIndicatorDefaults.colors()` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/ProgressIndicatorColors` that will be used to resolve the indicator and track color for this progress indicator in different states. |
| `strokeWidth: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = CircularProgressIndicatorDefaults.largeStrokeWidth` | The stroke width for the progress indicator. |
| `gapSize: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = CircularProgressIndicatorDefaults.calculateRecommendedGapSize(strokeWidth)` | The size of the gap between segments (in Dp). |
| `enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = true` | controls the enabled state. Although this component is not clickable, it can be contained within a clickable component. When enabled is `false`, this component will appear visually disabled. |

### SegmentedCircularProgressIndicator

Artifact: [androidx.wear.compose:compose-material3](https://developer.android.com/jetpack/androidx/releases/wear-compose) [View Source](https://cs.android.com/search?q=file:androidx/wear/compose/material3/SegmentedCircularProgressIndicator.kt+function:SegmentedCircularProgressIndicator) Added in [1.6.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.6.0)

```
@Composable
fun SegmentedCircularProgressIndicator(
    segmentCount: @IntRange(from = 1) Int,
    progress: () -> Float,
    modifier: Modifier = Modifier,
    allowProgressOverflow: Boolean = false,
    startAngle: Float = CircularProgressIndicatorDefaults.StartAngle,
    endAngle: Float = startAngle,
    colors: ProgressIndicatorColors = ProgressIndicatorDefaults.colors(),
    strokeWidth: Dp = CircularProgressIndicatorDefaults.largeStrokeWidth,
    gapSize: Dp = CircularProgressIndicatorDefaults.calculateRecommendedGapSize(strokeWidth),
    enabled: Boolean = true
): Unit
```

Material Design segmented circular progress indicator.

A segmented variant of `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/CircularProgressIndicator.composable#CircularProgressIndicator(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.Boolean,kotlin.Float,kotlin.Float,androidx.wear.compose.material3.ProgressIndicatorColors,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)` that is divided into equally sized segments.

Example of `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/SegmentedCircularProgressIndicator.composable#SegmentedCircularProgressIndicator(kotlin.Int,kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.Float,kotlin.Float,androidx.wear.compose.material3.ProgressIndicatorColors,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,kotlin.Boolean)` with progress value:

```kotlin
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.ui.Modifier
import androidx.wear.compose.material3.CircularProgressIndicator
import androidx.wear.compose.material3.CircularProgressIndicatorDefaults
import androidx.wear.compose.material3.MaterialTheme
import androidx.wear.compose.material3.ProgressIndicatorDefaults
import androidx.wear.compose.material3.SegmentedCircularProgressIndicator

Box(
    modifier =
        Modifier.background(MaterialTheme.colorScheme.background)
            .padding(CircularProgressIndicatorDefaults.FullScreenPadding)
            .fillMaxSize()
) {
    SegmentedCircularProgressIndicator(segmentCount = 5, progress = { 0.5f })
}
```

![SegmentedProgressIndicatorSample Composite
Image](https://developer.android.com/wear/images/design/WearComposeM3_SegmentedProgressIndicatorSample_CompositeImage.png)

Example of smaller size `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/SegmentedCircularProgressIndicator.composable#SegmentedCircularProgressIndicator(kotlin.Int,kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.Float,kotlin.Float,androidx.wear.compose.material3.ProgressIndicatorColors,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,kotlin.Boolean)`:

```kotlin
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.size
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import androidx.wear.compose.material3.CircularProgressIndicator
import androidx.wear.compose.material3.SegmentedCircularProgressIndicator

Box(modifier = Modifier.fillMaxSize()) {
    SegmentedCircularProgressIndicator(
        segmentCount = 6,
        progress = { 0.75f },
        modifier = Modifier.align(Alignment.Center).size(80.dp),
    )
}
```

![SmallSegmentedProgressIndicatorSample Composite
Image](https://developer.android.com/wear/images/design/WearComposeM3_SmallSegmentedProgressIndicatorSample_CompositeImage.png)

| Parameters |
|---|---|
| `segmentCount: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 1) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Number of equal segments that the progress indicator should be divided into. Has to be a number equal or greater to 1. |
| `progress: () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | The progress of this progress indicator where 0.0 represents no progress and 1.0 represents completion. Values smaller than 0.0 will be coerced to 0, while values larger than 1.0 will be wrapped around and shown as overflow with a different track color. The progress is applied to the entire `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/SegmentedCircularProgressIndicator.composable#SegmentedCircularProgressIndicator(kotlin.Int,kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.Float,kotlin.Float,androidx.wear.compose.material3.ProgressIndicatorColors,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,kotlin.Boolean)` across all segments. Progress changes will be animated. |
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier = Modifier` | Modifier to be applied to the SegmentedCircularProgressIndicator. |
| `allowProgressOverflow: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | When progress overflow is allowed, values smaller than 0.0 will be coerced to 0, while values larger than 1.0 will be wrapped around and shown as overflow with a different track color `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/ProgressIndicatorColors#overflowTrackBrush(kotlin.Boolean,kotlin.Float)`. For example values 1.2, 2.2 etc will be shown as 20% progress with the overflow color. When progress overflow is not allowed, progress values will be coerced into the range 0..1. |
| `startAngle: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = CircularProgressIndicatorDefaults.StartAngle` | The starting position of the progress arc, measured clockwise in degrees (0 to 360) from the 3 o'clock position. For example, 0 and 360 represent 3 o'clock, 90 and 180 represent 6 o'clock and 9 o'clock respectively. Default is 270 degrees `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/CircularProgressIndicatorDefaults#StartAngle()` (top of the screen). |
| `endAngle: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = startAngle` | The ending position of the progress arc, measured clockwise in degrees (0 to 360) from the 3 o'clock position. For example, 0 and 360 represent 3 o'clock, 90 and 180 represent 6 o'clock and 9 o'clock respectively. By default equal to `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/package-summary#SegmentedCircularProgressIndicator(kotlin.Int,kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.Float,kotlin.Float,androidx.wear.compose.material3.ProgressIndicatorColors,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,kotlin.Boolean)`. |
| `colors: https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/ProgressIndicatorColors = ProgressIndicatorDefaults.colors()` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/ProgressIndicatorColors` that will be used to resolve the indicator and track color for this progress indicator in different states. |
| `strokeWidth: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = CircularProgressIndicatorDefaults.largeStrokeWidth` | The stroke width for the progress indicator. |
| `gapSize: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = CircularProgressIndicatorDefaults.calculateRecommendedGapSize(strokeWidth)` | The size of the gap between segments (in Dp). |
| `enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = true` | controls the enabled state. Although this component is not clickable, it can be contained within a clickable component. When enabled is `false`, this component will appear visually disabled. |