Build apps faster with our new App builder! Check it out →

LinearProgressIndicator

Android

Component in Jetpack Glance

Adds a determinate linear progress indicator view to the glance view.

Last updated:

Installation

dependencies {
   implementation("androidx.glance:glance-appwidget:1.1.1")
}

Overloads

@Composable
fun LinearProgressIndicator(
    /*@FloatRange(from = 0.0, to = 1.0)*/
    progress: Float,
    modifier: GlanceModifier = GlanceModifier,
    color: ColorProvider = ProgressIndicatorDefaults.IndicatorColorProvider,
    backgroundColor: ColorProvider = ProgressIndicatorDefaults.BackgroundColorProvider
)

Parameters

namedescription
progressof this progress indicator, where 0.0 represents no progress and 1.0 represents full progress
modifierthe modifier to apply to the progress bar
colorThe color of the progress indicator.
backgroundColorThe color of the background behind the indicator, visible when theprogress has not reached that area of the overall indicator yet.
@Composable
fun LinearProgressIndicator(
    modifier: GlanceModifier = GlanceModifier,
    color: ColorProvider = ProgressIndicatorDefaults.IndicatorColorProvider,
    backgroundColor: ColorProvider = ProgressIndicatorDefaults.BackgroundColorProvider
)

Parameters

namedescription
modifierthe modifier to apply to the progress bar
colorThe color of the progress indicator.
backgroundColorThe color of the background behind the indicator, visible when theprogress has not reached that area of the overall indicator yet.
by @alexstyl