State of Compose 2023 results are in! Click here to learn more

← Back to Glance AppWidget

LazyColumn

Component
in
Glance AppWidget
. Since 1.0.0

Overview

Code Examples

Video

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.

@param modifier the modifier to apply to this layout @param horizontalAlignment the horizontal alignment applied to the items. @param content a 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.

Overloads

LazyColumn

@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