ArcProgressIndicator

Functions summary

Unit
@Composable
ArcProgressIndicator(
    modifier: Modifier,
    startAngle: Float,
    endAngle: Float,
    angularDirection: AngularDirection,
    colors: ProgressIndicatorColors,
    strokeWidth: Dp,
    gapSize: Dp
)

Indeterminate Material Design arc progress indicator.

Functions

ArcProgressIndicator

@Composable
fun ArcProgressIndicator(
    modifier: Modifier = Modifier,
    startAngle: Float = ArcProgressIndicatorDefaults.IndeterminateStartAngle,
    endAngle: Float = ArcProgressIndicatorDefaults.IndeterminateEndAngle,
    angularDirection: AngularDirection = AngularDirection.CounterClockwise,
    colors: ProgressIndicatorColors = ProgressIndicatorDefaults.colors(),
    strokeWidth: Dp = ArcProgressIndicatorDefaults.IndeterminateStrokeWidth,
    gapSize: Dp = ArcProgressIndicatorDefaults.calculateRecommendedGapSize(strokeWidth)
): Unit

Indeterminate Material Design arc progress indicator.

Indeterminate progress indicator expresses an unspecified wait time and animates indefinitely. This overload provides a variation over the usual circular spinner by allowing the start and end angles to be specified.

Example of indeterminate arc progress indicator:

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.wear.compose.material3.ArcProgressIndicator
import androidx.wear.compose.material3.ArcProgressIndicatorDefaults
import androidx.wear.compose.material3.ProgressIndicatorDefaults

Box(modifier = Modifier.fillMaxSize()) {
    ArcProgressIndicator(
        modifier =
            Modifier.align(Alignment.Center)
                .size(ArcProgressIndicatorDefaults.recommendedIndeterminateDiameter)
    )
}
Parameters
modifier: Modifier = Modifier

Modifier to be applied to the ArcProgressIndicator.

startAngle: Float = ArcProgressIndicatorDefaults.IndeterminateStartAngle

the start angle of this progress indicator arc (specified in degrees). It is recommended to use ArcProgressIndicatorDefaults.IndeterminateStartAngle. Measured clockwise from the three o'clock position.

endAngle: Float = ArcProgressIndicatorDefaults.IndeterminateEndAngle

the end angle of this progress indicator arc (specified in degrees). It is recommended to use ArcProgressIndicatorDefaults.IndeterminateEndAngle. Measured clockwise from the three o'clock position.

angularDirection: AngularDirection = AngularDirection.CounterClockwise

Determines whether the animation is in the clockwise or counter-clockwise direction.

colors: ProgressIndicatorColors = ProgressIndicatorDefaults.colors()

ProgressIndicatorColors that will be used to resolve the indicator and track color for this progress indicator.

strokeWidth: Dp = ArcProgressIndicatorDefaults.IndeterminateStrokeWidth

The stroke width for the progress indicator. The recommended value is ArcProgressIndicatorDefaults.IndeterminateStrokeWidth.

gapSize: Dp = ArcProgressIndicatorDefaults.calculateRecommendedGapSize(strokeWidth)

The size (in Dp) of the gap between the ends of the progress indicator and the track. The stroke end caps are not included in this distance.