Composable Function

RemoteCurvedProgressIndicator

A generalized progress arc component for display on Wear OS.

RemoteCurvedProgressIndicator

Source set: Android
@Composable
public fun RemoteCurvedProgressIndicator(
    progress: RemoteFloat,
    modifier: RemoteModifier = RemoteModifier,
    enabled: RemoteBoolean = true.rb,
    startAngle: RemoteFloat = RemoteProgressIndicatorDefaults.CurvedIndicatorStartAngle,
    sweepAngle: RemoteFloat = RemoteProgressIndicatorDefaults.CurvedIndicatorSweepAngle,
    colors: RemoteProgressIndicatorColors = RemoteProgressIndicatorDefaults.colors(),
    strokeWidth: RemoteDp = RemoteProgressIndicatorDefaults.CurvedIndicatorStrokeWidth,
    padding: RemoteDp = RemoteProgressIndicatorDefaults.CurvedIndicatorPadding,
    gapAngleDegrees: RemoteFloat = RemoteProgressIndicatorDefaults.CurvedIndicatorGapAngleDegrees,
    dotFadeOutFraction: RemoteFloat =
        RemoteProgressIndicatorDefaults.CurvedIndicatorDotFadeOutFraction,
    dotCollapsible: RemoteBoolean = true.rb,
    reverseDirection: RemoteBoolean = false.rb,
)

A generalized progress arc component for display on Wear OS.

Angles are measured in degrees with 0 degrees at the 3 o'clock position. By default (reverseDirection is false), the arc sweeps clockwise from startAngle by sweepAngle degrees; when reverseDirection is true, the arc is mirrored horizontally (starting at 180 - startAngle) and sweeps counter-clockwise.

To also animate the start and end of the progress, for example for a timer or a goal, use RemoteIntroOutroCurvedProgressIndicator.

Example of a RemoteCurvedProgressIndicator displaying a progress arc:

Example that animates progress changes on click:

Parameters

progress A float value representing progress (typically 0f to 1f).
modifier Modifier to be applied to the canvas.
enabled controls the enabled state. When enabled is false, this component will appear visually disabled.
startAngle The starting position of the progress arc in degrees, with 0 degrees at the 3 o'clock position. For example, 135 is bottom left.
sweepAngle The total sweep angle (magnitude) of the progress arc in degrees, for example, 90 degrees. Negative values are coerced to 0 (nothing is drawn when sweepAngle is 0 or negative); use reverseDirection to sweep counter-clockwise.
colors RemoteProgressIndicatorColors that will be used to resolve the indicator and track color.
strokeWidth Width of the arc in dp. Negative values are coerced to 0; nothing is drawn when strokeWidth is 0 or negative.
padding Padding from the canvas/screen edge in dp.
gapAngleDegrees Size of the visual separation gap between segments in degrees. Set to 0f for continuous bars.
dotFadeOutFraction The fraction of the dot's size (from 0.0 to 1.0) below which the dot fades its opacity to transparent as it collapses/expands. Set to 0.0 to disable opacity fading and shrink purely through size.
dotCollapsible Whether the indicator's dot should collapse as it approaches the end of the track.
reverseDirection Whether to reverse the direction of the progress indicator (RTL).
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: