Composable Function

RemoteLinearProgressIndicator

Material Design linear progress indicator.

RemoteLinearProgressIndicatorSample

@Sampled
@RemoteComposable
@Composable
@WearPreviewDevices
@PreviewWrapper(RemoteComponentPreviewWrapper::class)
public fun RemoteLinearProgressIndicatorSample(modifier: RemoteModifier = RemoteModifier) {
    RemoteLinearProgressIndicator(modifier = modifier.width(140.rdp), progress = 0.66f.rf)
}

RemoteLinearProgressIndicatorAnimatedSample

@Sampled
@RemoteComposable
@Composable
@WearPreviewDevices
@PreviewWrapper(RemoteComponentPreviewWrapper::class)
public fun RemoteLinearProgressIndicatorAnimatedSample(
    modifier: RemoteModifier = RemoteModifier.width(140.rdp)
) {
    val progress = rememberMutableRemoteFloat { 0.25f.rf }
    val animatedProgress =
        animateRemoteFloatAsState(
            targetValue = progress,
            animationSpec = remoteTween(durationMillis = 250),
        )
    val toggleAction = valueChange(progress, (progress + 0.25f) % 1f)
    RemoteLinearProgressIndicator(
        modifier = modifier.clickable(toggleAction),
        progress = animatedProgress,
    )
}

Content updated: