LayoutElementBuilders.Row


@RequiresSchemaVersion(major = 1, minor = 0)
class LayoutElementBuilders.Row : LayoutElementBuilders.LayoutElement


A row of elements. Each child will be laid out horizontally, one after another (i.e. stacking to the right). This element will size itself to the smallest size required to hold all of its children (e.g. if it contains three elements sized 10x10, 20x20 and 30x30, the resulting row will be 60x30).

If specified, vertical_alignment can be used to control the gravity inside the container, affecting the vertical placement of children whose width are smaller than the resulting row height.

Summary

Nested types

Builder for Row.

Public functions

(Mutable)List<LayoutElementBuilders.LayoutElement!>

Gets the list of child elements to place inside this Row.

DimensionBuilders.ContainerDimension?

Gets the height of this row.

ModifiersBuilders.Modifiers?

Gets androidx.wear.protolayout.ModifiersBuilders.Modifiers for this element.

LayoutElementBuilders.VerticalAlignmentProp?

Gets the vertical alignment of elements inside this row, if they are narrower than the resulting height of the row.

DimensionBuilders.ContainerDimension?

Gets the width of this row.

String

Public functions

getContents

Added in 1.0.0
fun getContents(): (Mutable)List<LayoutElementBuilders.LayoutElement!>

Gets the list of child elements to place inside this Row.

getHeight

Added in 1.0.0
fun getHeight(): DimensionBuilders.ContainerDimension?

Gets the height of this row. If not defined, this will size itself to fit all of its children (i.e. a WrappedDimension).

getVerticalAlignment

Added in 1.0.0
fun getVerticalAlignment(): LayoutElementBuilders.VerticalAlignmentProp?

Gets the vertical alignment of elements inside this row, if they are narrower than the resulting height of the row. If not defined, defaults to VERTICAL_ALIGN_CENTER.

getWidth

Added in 1.0.0
fun getWidth(): DimensionBuilders.ContainerDimension?

Gets the width of this row. If not defined, this will size itself to fit all of its children (i.e. a WrappedDimension).

toString

fun toString(): String