RemoteCircularProgressIndicator

Functions summary

Unit
@RemoteComposable
@Composable
RemoteCircularProgressIndicator(
    progress: RemoteFloat,
    modifier: RemoteModifier,
    enabled: RemoteBoolean,
    startAngle: RemoteFloat,
    endAngle: RemoteFloat,
    colors: RemoteProgressIndicatorColors,
    strokeWidth: RemoteDp,
    gapSize: RemoteDp
)

Material Design circular progress indicator.

Functions

RemoteCircularProgressIndicator

@RemoteComposable
@Composable
fun RemoteCircularProgressIndicator(
    progress: RemoteFloat,
    modifier: RemoteModifier = RemoteModifier,
    enabled: RemoteBoolean = true.rb,
    startAngle: RemoteFloat = 270f.rf,
    endAngle: RemoteFloat = startAngle,
    colors: RemoteProgressIndicatorColors = RemoteProgressIndicatorDefaults.colors(),
    strokeWidth: RemoteDp = 8.rdp,
    gapSize: RemoteDp = RemoteProgressIndicatorDefaults.calculateRecommendedGapSize(strokeWidth)
): Unit

Material Design circular progress indicator.

import androidx.compose.remote.creation.compose.state.rf
import androidx.wear.compose.remote.material3.RemoteCircularProgressIndicator

RemoteCircularProgressIndicator(modifier = modifier, progress = 0.75f.rf)

For an animated progress, see:

import androidx.compose.remote.creation.compose.action.ValueChange
import androidx.compose.remote.creation.compose.modifier.clickable
import androidx.compose.remote.creation.compose.state.animateRemoteFloat
import androidx.compose.remote.creation.compose.state.rememberMutableRemoteFloat
import androidx.compose.remote.creation.compose.state.rf
import androidx.wear.compose.remote.material3.RemoteCircularProgressIndicator

val progress = rememberMutableRemoteFloat { 0.25f.rf }
val animatedProgress = animateRemoteFloat(0.25f) { progress }

val toggleAction = ValueChange(progress, ((progress + 0.25f) % 1f).createReference())

RemoteCircularProgressIndicator(progress = animatedProgress, modifier.clickable(toggleAction))
Parameters
progress: RemoteFloat

The progress of this progress indicator where 0.0 represents no progress and 1.0 represents completion.

modifier: RemoteModifier = RemoteModifier

Modifier to be applied to the CircularProgressIndicator.

enabled: RemoteBoolean = true.rb

controls the enabled state. When enabled is false, this component will appear visually disabled. Note that only solid colors are when enabled is an expression, otherwise it must be a constant.

startAngle: RemoteFloat = 270f.rf

The starting position of the progress arc, measured clockwise in degrees. For example, 0 is 3 o'clock.

endAngle: RemoteFloat = startAngle

The ending position of the progress arc.

colors: RemoteProgressIndicatorColors = RemoteProgressIndicatorDefaults.colors()

RemoteProgressIndicatorColors that will be used to resolve the indicator and track color.

strokeWidth: RemoteDp = 8.rdp

The stroke width for the progress indicator.

gapSize: RemoteDp = RemoteProgressIndicatorDefaults.calculateRecommendedGapSize(strokeWidth)

The size (in RemoteDp) of the gap between the ends of the progress indicator and the track. The stroke endcaps are not included in this distance.