RotatingProgressIndicator

fun RotatingProgressIndicator(modifier: Modifier = Modifier, color: Color = COUITheme.colorScheme.onSurfaceContainer, size: Dp = ProgressIndicatorDefaults.DefaultRotatingProgressIndicatorSize, ringDiameter: Dp = ProgressIndicatorDefaults.DefaultRotatingProgressIndicatorRingDiameter, strokeWidth: Dp = ProgressIndicatorDefaults.DefaultRotatingProgressIndicatorStrokeWidth)

A RotatingProgressIndicator with COUI style.

ColorOS's indeterminate spinner: a single bare stroked arc with flat caps and no background ring, whose sweep pulses while the whole arc spins. Ported from the Lottie asset coui_rotating_loading.json, which Theme.COUI binds to couiRotatingSpinnerJsonName and COUILottieLoadingView renders (the same animation also ships as the fb_loading.xml AnimatedVectorDrawable). The asset is one ellipse driven by one trim path, so it is reproduced here with a single drawArc and needs no Lottie runtime.

Parameters

modifier

The modifier to be applied to the indicator.

color

The color of the arc.

size

The size (the square view box) of the indicator.

ringDiameter

The diameter of the arc's stroke centerline, centered inside size.

strokeWidth

The width of the arc stroke.