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 = remember { MutableRemoteFloat(0.25f) }
    val toggleAction = valueChangeAction(progress, (progress + 0.25f.rf) % 1f.rf)
    // The indicator animates the progress changes.
    RemoteLinearProgressIndicator(modifier = modifier.clickable(toggleAction), progress = progress)
}
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: