LazyRow
The horizontally scrolling list that only composes and lays out the currently visible items. The content block defines a DSL which allows you to emit items of different types. For example you can use LazyListScope.item to add a single item and LazyListScope.items to add a list of items.
The purpose of placeholder is to define the temporary content of an on-screen item while the content of that item (as described by the content block) is being retrieved. When the content of that item has been retrieved, the placeholder is replaced with that of the content.
Parameters
The state object to be used to control or observe the list's state.
Sets whether the row's width will wrap its contents (Constraint.Wrap) or match the width of its parent (Constraint.Fill).
Sets whether the row's height will wrap its contents (Constraint.Wrap) or match the height of its parent (Constraint.Fill).
Applies margin (space) around the list. This can also be applied to an individual item using Modifier.margin
.
the vertical alignment applied to the items.
The modifier to apply to this layout.
A block which describes the content of each placeholder item. Note that the placeholder block will be invoked multiple times, and assumes that the content and its sizing on each invocation is identical to one another.
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.
The horizontally scrolling list that only composes and lays out the currently visible items. The content block defines a DSL which allows you to emit items of different types. For example you can use LazyListScope.item to add a single item and LazyListScope.items to add a list of items.
This function differs from the other LazyRow function, in that a refresh indicator is conditionally displayed via a vertical swipe gesture when at the beginning of the list. The appropriate response to this gesture can be supplied via the onRefresh callback.
The purpose of placeholder is to define the temporary content of an on-screen item while the content of that item (as described by the content block) is being retrieved. When the content of that item has been retrieved, the placeholder is replaced with that of the content.
Parameters
Whether or not the list should show the pull-to-refresh indicator.
Called when a swipe gesture triggers a pull-to-refresh.
The state object to be used to control or observe the list's state.
Sets whether the row's width will wrap its contents (Constraint.Wrap) or match the width of its parent (Constraint.Fill).
Sets whether the row's height will wrap its contents (Constraint.Wrap) or match the height of its parent (Constraint.Fill).
Applies margin (space) around the list. This can also be applied to an individual item using Modifier.margin
.
the vertical alignment applied to the items.
The color of the pull-to-refresh indicator as an ARGB color int. For example, the color 0xFF00AA00
would be a dark green with 100% opacity.
The modifier to apply to this layout.
A block which describes the content of each placeholder item. Note that the placeholder block will be invoked multiple times, and assumes that the content and its sizing on each invocation is identical to one another.
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.