We just launched Compose Examples featuring over 150+ components! Check it out →

LazyColumn

Android

Component in Jetpack Glance

A vertical scrolling list that only lays out the currently visible items. The [content] block defines a DSL which allows you to emit different list items.

Last updated:

Installation

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

Overloads

@Composable
fun LazyColumn(
    modifier: GlanceModifier = GlanceModifier,
    horizontalAlignment: Alignment.Horizontal = Alignment.Start,
    content: LazyListScope.() -> Unit
)

Parameters

namedescription
modifierthe modifier to apply to this layout
horizontalAlignmentthe horizontal alignment applied to the items.
contenta block which describes the content. Inside this block you can use methods like[LazyListScope.item] to add a single item or [LazyListScope.items] to add a list of items. If theitem has more than one top-level child, they will be automatically wrapped in a Box.
@ExperimentalGlanceApi
@Composable
fun LazyColumn(
    activityOptions: Bundle,
    modifier: GlanceModifier = GlanceModifier,
    horizontalAlignment: Alignment.Horizontal = Alignment.Start,
    content: LazyListScope.() -> Unit
)

Parameters

namedescription
activityOptionsAdditional options built from an [android.app.ActivityOptions] to apply toan activity start.
modifierthe modifier to apply to this layout
horizontalAlignmentthe horizontal alignment applied to the items.
contenta block which describes the content. Inside this block you can use methods like[LazyListScope.item] to add a single item or [LazyListScope.items] to add a list of items. If theitem has more than one top-level child, they will be automatically wrapped in a Box.
by @alexstyl