Composable Function

RemoteIntroOutroCurvedProgressIndicator

A RemoteCurvedProgressIndicator that plays spring animations at the start and end of the progress, for example for a timer, or for a goal such as a distance, calories or steps.

RemoteIntroOutroCurvedProgressIndicatorSample

@Sampled
@RemoteComposable
@Composable
@WearPreviewDevices
@PreviewWrapper(RemoteComponentPreviewWrapper::class)
public fun RemoteIntroOutroCurvedProgressIndicatorSample(
    modifier: RemoteModifier = RemoteModifier.size(150.rdp)
) {
    val progress = remember { MutableRemoteFloat(0.5f) }
    val nextProgress =
        progress.isGreaterThanOrEqualTo(1f.rf).select(ifTrue = 0f.rf, ifFalse = progress + 0.5f.rf)
    val stepAction = valueChangeAction(progress, nextProgress)

    RemoteIntroOutroCurvedProgressIndicator(
        progress = progress,
        modifier = modifier.clickable(stepAction),
        startAngle = 135f.rf,
        sweepAngle = 90f.rf,
    )
}
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: