LayoutElementBuilders.Box.Builder


class LayoutElementBuilders.Box.Builder


Builder for Box.

Summary

Public constructors

Creates an instance of Builder.

Public functions

LayoutElementBuilders.Box.Builder

Adds one item to the child element(s) to wrap.

LayoutElementBuilders.Box

Builds an instance from accumulated values.

LayoutElementBuilders.Box.Builder

Sets the height of this Box.

LayoutElementBuilders.Box.Builder
@RequiresSchemaVersion(major = 1, minor = 0)
setHorizontalAlignment(horizontalAlignment: Int)

Sets the horizontal alignment of the element inside this Box.

LayoutElementBuilders.Box.Builder
@RequiresSchemaVersion(major = 1, minor = 0)
setHorizontalAlignment(
    horizontalAlignment: LayoutElementBuilders.HorizontalAlignmentProp
)

Sets the horizontal alignment of the element inside this Box.

LayoutElementBuilders.Box.Builder
@RequiresSchemaVersion(major = 1, minor = 0)
setModifiers(modifiers: ModifiersBuilders.Modifiers)

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

LayoutElementBuilders.Box.Builder
@RequiresSchemaVersion(major = 1, minor = 0)
setVerticalAlignment(verticalAlignment: Int)

Sets the vertical alignment of the element inside this Box.

LayoutElementBuilders.Box.Builder
@RequiresSchemaVersion(major = 1, minor = 0)
setVerticalAlignment(
    verticalAlignment: LayoutElementBuilders.VerticalAlignmentProp
)

Sets the vertical alignment of the element inside this Box.

LayoutElementBuilders.Box.Builder

Sets the width of this Box.

Public constructors

Builder

Added in 1.0.0
Builder()

Creates an instance of Builder.

Public functions

addContent

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 0)
fun addContent(content: LayoutElementBuilders.LayoutElement): LayoutElementBuilders.Box.Builder

Adds one item to the child element(s) to wrap.

build

Added in 1.0.0
fun build(): LayoutElementBuilders.Box

Builds an instance from accumulated values.

setHeight

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 0)
fun setHeight(height: DimensionBuilders.ContainerDimension): LayoutElementBuilders.Box.Builder

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

setHorizontalAlignment

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 0)
fun setHorizontalAlignment(horizontalAlignment: Int): LayoutElementBuilders.Box.Builder

Sets the horizontal alignment of the element inside this Box. If not defined, defaults to HORIZONTAL_ALIGN_CENTER.

setHorizontalAlignment

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 0)
fun setHorizontalAlignment(
    horizontalAlignment: LayoutElementBuilders.HorizontalAlignmentProp
): LayoutElementBuilders.Box.Builder

Sets the horizontal alignment of the element inside this Box. If not defined, defaults to HORIZONTAL_ALIGN_CENTER.

setVerticalAlignment

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 0)
fun setVerticalAlignment(verticalAlignment: Int): LayoutElementBuilders.Box.Builder

Sets the vertical alignment of the element inside this Box. If not defined, defaults to VERTICAL_ALIGN_CENTER.

setVerticalAlignment

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 0)
fun setVerticalAlignment(
    verticalAlignment: LayoutElementBuilders.VerticalAlignmentProp
): LayoutElementBuilders.Box.Builder

Sets the vertical alignment of the element inside this Box. If not defined, defaults to VERTICAL_ALIGN_CENTER.

setWidth

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 0)
fun setWidth(width: DimensionBuilders.ContainerDimension): LayoutElementBuilders.Box.Builder

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