LayoutElementBuilders.Box

Added in 1.0.0
Deprecated in 1.2.0

class LayoutElementBuilders.Box : LayoutElementBuilders.LayoutElement


A container which stacks all of its children on top of one another. This also allows to add a background color, or to have a border around them with some padding.

Summary

Public functions

(Mutable)List<LayoutElementBuilders.LayoutElement!>

Gets the child element(s) to wrap.

DimensionBuilders.ContainerDimension?

Gets the height of this Box.

LayoutElementBuilders.HorizontalAlignmentProp?

Gets the horizontal alignment of the element inside this Box.

ModifiersBuilders.Modifiers?

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

LayoutElementBuilders.VerticalAlignmentProp?

Gets the vertical alignment of the element inside this Box.

DimensionBuilders.ContainerDimension?

Gets the width of this Box.

Public functions

getContents

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

Gets the child element(s) to wrap. Intended for testing purposes only.

getHeight

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

Gets the height of this Box. If not defined, this will size itself to fit all of its children (i.e. a WrappedDimension). Intended for testing purposes only.

getHorizontalAlignment

Added in 1.0.0
Deprecated in 1.2.0
fun getHorizontalAlignment(): LayoutElementBuilders.HorizontalAlignmentProp?

Gets the horizontal alignment of the element inside this Box. If not defined, defaults to HORIZONTAL_ALIGN_CENTER. Intended for testing purposes only.

getModifiers

Added in 1.0.0
Deprecated in 1.2.0
fun getModifiers(): ModifiersBuilders.Modifiers?

Gets androidx.wear.tiles.ModifiersBuilders.Modifiers for this element. Intended for testing purposes only.

getVerticalAlignment

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

Gets the vertical alignment of the element inside this Box. If not defined, defaults to VERTICAL_ALIGN_CENTER. Intended for testing purposes only.

getWidth

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

Gets the width of this Box. If not defined, this will size itself to fit all of its children (i.e. a WrappedDimension). Intended for testing purposes only.