ColumnScope

class ColumnScope : FlexScope
kotlin.Any
   ↳ androidx.ui.layout.FlexScope
   ↳ androidx.ui.layout.ColumnScope

A ColumnScope provides a scope for the children of a Column.

Summary

Public methods

LayoutModifier

A layout modifier within a Column that positions target component in a perpendicular direction according to the AlignmentLine.

Inherited functions

Properties

LayoutModifier

A layout modifier within a Column that positions target component in a horizontal direction so that its center is in the middle of the horizontal axis.

LayoutModifier

A layout modifier within a Column that positions target component in a horizontal direction so that its end edge is aligned to the end edge of the horizontal axis.

LayoutModifier

A layout modifier within a Column that positions target component in a horizontal direction so that its start edge is aligned to the start edge of the horizontal axis.

Inherited properties

Public methods

RelativeToSiblings

fun Gravity.RelativeToSiblings(alignmentLine: VerticalAlignmentLine): LayoutModifier

A layout modifier within a Column that positions target component in a perpendicular direction according to the AlignmentLine. If target component is the only component within a Column with the specified RelativeToSiblings modifier, or if the provided alignment line is not defined for the component, the component will be positioned using Gravity.Start.

Example usage:

import androidx.ui.layout.Column

Column {
    // Center of the first rectangle is aligned to the right edge of the second rectangle and
    // left edge of the third one.
    SizedRectangle(
        Gravity.RelativeToSiblings { it.width * 0.5 },
        color = Color.Blue,
        width = 80.dp,
        height = 40.dp
    )
    SizedRectangleWithLines(
        Gravity.RelativeToSiblings(End),
        color = Color.Magenta,
        width = 80.dp,
        height = 40.dp
    )
    SizedRectangleWithLines(
        Gravity.RelativeToSiblings(Start),
        color = Color.Red,
        width = 80.dp,
        height = 40.dp
    )
}

Properties

Center

val Gravity.Center: LayoutModifier

A layout modifier within a Column that positions target component in a horizontal direction so that its center is in the middle of the horizontal axis.

End

val Gravity.End: LayoutModifier

A layout modifier within a Column that positions target component in a horizontal direction so that its end edge is aligned to the end edge of the horizontal axis.

Start

val Gravity.Start: LayoutModifier

A layout modifier within a Column that positions target component in a horizontal direction so that its start edge is aligned to the start edge of the horizontal axis.