Compose Unstyled 2.0 is out! Check the official announcement blog ->
Compose Component

GlimmerLazyColumn

This is a scrolling list component that only composes and lays out the currently visible items.

GlimmerLazyColumn

Source set: Android
@Composable
public fun GlimmerLazyColumn(
    modifier: Modifier = Modifier,
    state: GlimmerLazyListState = rememberGlimmerLazyListState(),
    contentPadding: PaddingValues = GlimmerLazyColumnDefaults.contentPadding,
    userScrollEnabled: Boolean = true,
    overscrollEffect: OverscrollEffect? = rememberOverscrollEffect(),
    flingBehavior: FlingBehavior = GlimmerLazyColumnDefaults.flingBehavior(state),
    reverseLayout: Boolean = false,
    horizontalAlignment: Alignment.Horizontal = Alignment.Start,
    verticalArrangement: Arrangement.Vertical = GlimmerLazyColumnDefaults.verticalArrangement,
    content: GlimmerLazyListScope.() -> Unit,
): Unit

Parameters

modifier the modifier to apply to this layout.
state the state object to be used to control or observe the list's state.
contentPadding a padding around the whole content. This will add padding for the content after it has been clipped, which is not possible via modifier param. You can use it to add a padding before the first item or after the last one.
userScrollEnabled If user gestures are enabled.
overscrollEffect the OverscrollEffect that will be used to render overscroll for this layout. Note that the OverscrollEffect.node will be applied internally as well - you do not need to use Modifier.overscroll separately.
flingBehavior logic describing fling and snapping behavior when drag has finished.
reverseLayout reverses the direction of scrolling and layout.
horizontalAlignment aligns items horizontally.
verticalArrangement is arrangement for items. This only applies if the content is smaller than the viewport.
content a block which describes the content. Inside this block you can use methods like GlimmerLazyListScope.item to add a single item or GlimmerLazyListScope.items to add a list of items.

GlimmerLazyColumn

Source set: Android
@Composable
public fun GlimmerLazyColumn(
    title: @Composable () -> Unit,
    modifier: Modifier = Modifier,
    state: GlimmerLazyListState = rememberGlimmerLazyListState(),
    contentPadding: PaddingValues = GlimmerLazyColumnDefaults.contentPaddingWithTitle,
    userScrollEnabled: Boolean = true,
    overscrollEffect: OverscrollEffect? = rememberOverscrollEffect(),
    flingBehavior: FlingBehavior = GlimmerLazyColumnDefaults.flingBehavior(state),
    reverseLayout: Boolean = false,
    horizontalAlignment: Alignment.Horizontal = Alignment.Start,
    verticalArrangement: Arrangement.Vertical = GlimmerLazyColumnDefaults.verticalArrangement,
    content: GlimmerLazyListScope.() -> Unit,
)

Parameters

title a composable slot for the list title, expected to be a androidx.xr.glimmer.TitleChip. It overlaps the list, positioned at the top-center, and remains stuck to the top when the list is scrolled.
modifier applies to the layout that contains both list and title.
state the state object to be used to control or observe the list's state.
contentPadding a padding around the whole content. This will add padding for the content after it has been clipped, which is not possible via modifier param. You can use it to add a padding before the first item or after the last one. The list is vertically offset to start from the title's vertical center, so custom content paddings must provide sufficient space to avoid content being obscured.
userScrollEnabled If user gestures are enabled.
overscrollEffect the OverscrollEffect that will be used to render overscroll for this layout. Note that the OverscrollEffect.node will be applied internally as well - you do not need to use Modifier.overscroll separately.
flingBehavior logic describing fling and snapping behavior when drag has finished.
reverseLayout reverses the direction of scrolling and layout.
horizontalAlignment aligns items horizontally.
verticalArrangement is arrangement for items. This only applies if the content is smaller than the viewport.
content a block which describes the content. Inside this block you can use methods like GlimmerLazyListScope.item to add a single item or GlimmerLazyListScope.items to add a list of items.

Last updated: