public object ProgressIndicatorDefaults
Contains the default values used for LinearProgressIndicator and CircularProgressIndicator.
Properties
linearColor
public val linearColor: Color
Default color for a linear progress indicator.
circularColor
public val circularColor: Color
Default color for a circular progress indicator.
linearTrackColor
public val linearTrackColor: Color
Default track color for a linear progress indicator.
circularTrackColor
@Deprecated(
"Renamed to circularDeterminateTrackColor or circularIndeterminateTrackColor",
ReplaceWith("ProgressIndicatorDefaults.circularIndeterminateTrackColor"),
DeprecationLevel.WARNING,
)
public val circularTrackColor: Color
Default track color for a circular progress indicator.
circularDeterminateTrackColor
public val circularDeterminateTrackColor: Color
Default track color for a circular determinate progress indicator.
circularIndeterminateTrackColor
public val circularIndeterminateTrackColor: Color
Default track color for a circular indeterminate progress indicator.
CircularStrokeWidth
public val CircularStrokeWidth: Dp = CircularProgressIndicatorTokens.TrackThickness
Default stroke width for a circular progress indicator.
LinearStrokeCap
public val LinearStrokeCap: StrokeCap = StrokeCap.Round
Default stroke cap for a linear progress indicator.
CircularDeterminateStrokeCap
public val CircularDeterminateStrokeCap: StrokeCap = StrokeCap.Round
Default stroke cap for a determinate circular progress indicator.
CircularIndeterminateStrokeCap
public val CircularIndeterminateStrokeCap: StrokeCap = StrokeCap.Round
Default stroke cap for an indeterminate circular progress indicator.
LinearTrackStopIndicatorSize
public val LinearTrackStopIndicatorSize: Dp = LinearProgressIndicatorTokens.StopSize
Default track stop indicator size for a linear progress indicator.
LinearIndicatorTrackGapSize
public val LinearIndicatorTrackGapSize: Dp = LinearProgressIndicatorTokens.TrackActiveSpace
Default indicator track gap size for a linear progress indicator.
CircularIndicatorTrackGapSize
public val CircularIndicatorTrackGapSize: Dp = CircularProgressIndicatorTokens.TrackActiveSpace
Default indicator track gap size for a circular progress indicator.
ProgressAnimationSpec
public val ProgressAnimationSpec: SpringSpec<Float> =
SpringSpec(
dampingRatio = Spring.DampingRatioNoBouncy,
stiffness = Spring.StiffnessVeryLow,
// The default threshold is 0.01, or 1% of the overall progress range, which is quite
// large and noticeable. We purposefully choose a smaller threshold.
visibilityThreshold = 1 / 1000f,
)
The default androidx.compose.animation.core.AnimationSpec that should be used when animating between progress in a determinate progress indicator.
Functions
drawStopIndicator
public fun drawStopIndicator(
drawScope: DrawScope,
stopSize: Dp,
color: Color,
strokeCap: StrokeCap,
)
Draws the stop indicator at the end of the track.
Parameters
| drawScope | the DrawScope |
| stopSize | size of this stop indicator, it cannot be bigger than the track's height |
| color | color of this stop indicator |
| strokeCap | stroke cap to use for the ends of this stop indicator |