androidx.compose.foundation.layout
ColumnScope
Interface · from org.jetbrains.compose.foundation:foundation-layout:1.12.2
No hand-written docs yet.
Scope for the children of Column.
interface ColumnScope
Kinds of ColumnScope
Anywhere a ColumnScope is expected, you can pass any of these.
FlowColumnScopefoundation-layoutFlowColumnOverflowScopefoundation-layout
How to get one
Or create one of the kinds listed above.
Used by
Parameters that take a ColumnScope.
BottomSheet(content)BottomSheetScaffold(sheetContent)Card(content)Column(content)DatePickerDialog(content)DismissibleDrawerSheet(content)DockedSearchBar(content)DropdownMenu(content)DropdownMenuGroup(content)DropdownMenuPopup(content)ElevatedCard(content)ExpandedDockedSearchBar(content)ExpandedDockedSearchBarWithGap(content)ExpandedFullScreenContainedSearchBar(content)ExpandedFullScreenSearchBar(content)ExposedDropdownMenuBoxScope.ExposedDropdownMenu(content)ModalBottomSheet(content)ModalDrawerSheet(content)NavigationRail(content)OutlinedCard(content)PermanentDrawerSheet(content)SearchBar(content)Tab(content)TimePickerDialog(content)VerticalFloatingToolbar(content)
Functions
weight
fun Modifier.weight(
weight: Float,
fill: Boolean = true,
): Modifier
Size the element's height proportional to its weight relative to other weighted sibling elements in the Column. The parent will divide the vertical space remaining after measuring unweighted child elements and distribute it according to this weight. When fill is true, the element will be forced to occupy the whole height allocated to it. Otherwise, the element is allowed to be smaller - this will result in Column being smaller, as the unused allocated height will not be redistributed to other siblings.
align
fun Modifier.align(alignment: Alignment.Horizontal): Modifier
Align the element horizontally within the Column. This alignment will have priority over the Column's horizontalAlignment parameter.
alignBy
fun Modifier.alignBy(alignmentLine: VerticalAlignmentLine): Modifier
Position the element horizontally such that its alignmentLine aligns with sibling elements also configured to alignBy. alignBy is a form of align, so both modifiers will not work together if specified for the same layout. Within a Column, all components with alignBy will align horizontally using the specified VerticalAlignmentLines or values provided using the other alignBy overload, forming a sibling group. At least one element of the sibling group will be placed as it had Alignment.Start align in Column, and the alignment of the other siblings will be then determined such that the alignment lines coincide. Note that if only one element in a Column has the alignBy modifier specified the element will be positioned as if it had Alignment.Start align.
fun Modifier.alignBy(alignmentLineBlock: (Measured) -> Int): Modifier
Position the element horizontally such that the alignment line for the content as determined by alignmentLineBlock aligns with sibling elements also configured to alignBy. alignBy is a form of align, so both modifiers will not work together if specified for the same layout. Within a Column, all components with alignBy will align horizontally using the specified VerticalAlignmentLines or values obtained from alignmentLineBlock, forming a sibling group. At least one element of the sibling group will be placed as it had Alignment.Start align in Column, and the alignment of the other siblings will be then determined such that the alignment lines coincide. Note that if only one element in a Column has the alignBy modifier specified the element will be positioned as if it had Alignment.Start align.
Library docs
Scope for the children of Column.