ArcProgressIndicator
Android
Component in Wear Material 3 Compose
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.
Last updated:
Installation
dependencies {
implementation("androidx.wear.compose:compose-material3:1.0.0-alpha32")
}
Overloads
@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),
)
Parameters
name | description |
---|---|
modifier | Modifier to be applied to the ArcProgressIndicator. |
startAngle | 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 | 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 | Determines whether the animation is in the clockwise or counter-clockwise direction. |
colors | [ProgressIndicatorColors] that will be used to resolve the indicator and track color for this progress indicator. |
strokeWidth | The stroke width for the progress indicator. The recommended value is [ArcProgressIndicatorDefaults.IndeterminateStrokeWidth]. |
gapSize | 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. |
Code Example
IndeterminateProgressArcSample
@Composable
fun IndeterminateProgressArcSample() {
Box(modifier = Modifier.fillMaxSize()) {
ArcProgressIndicator(
modifier =
Modifier.align(Alignment.Center)
.size(ArcProgressIndicatorDefaults.recommendedIndeterminateDiameter),
)
}
}