LayoutElementBuilders.Box.Builder

public static final class LayoutElementBuilders.Box.Builder
extends Object implements LayoutElementBuilders.LayoutElement.Builder

java.lang.Object
   ↳ androidx.wear.tiles.builders.LayoutElementBuilders.Box.Builder


Builder for LayoutElementBuilders.Box.

Summary

Public methods

LayoutElementBuilders.Box.Builder addContent(LayoutElementBuilders.LayoutElement.Builder contentBuilder)

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

LayoutElementBuilders.Box.Builder addContent(LayoutElementBuilders.LayoutElement content)

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

LayoutElementBuilders.Box build()

Builds an instance with values accumulated in this Builder.

LayoutElementBuilders.Box.Builder setHeight(DimensionBuilders.ContainerDimension.Builder heightBuilder)

Sets the height of this LayoutElementBuilders.Box.

LayoutElementBuilders.Box.Builder setHeight(DimensionBuilders.ContainerDimension height)

Sets the height of this LayoutElementBuilders.Box.

LayoutElementBuilders.Box.Builder setHorizontalAlignment(int horizontalAlignment)

Sets the horizontal alignment of the element inside this LayoutElementBuilders.Box.

LayoutElementBuilders.Box.Builder setModifiers(ModifiersBuilders.Modifiers modifiers)

Sets ModifiersBuilders.Modifiers for this element.

LayoutElementBuilders.Box.Builder setModifiers(ModifiersBuilders.Modifiers.Builder modifiersBuilder)

Sets ModifiersBuilders.Modifiers for this element.

LayoutElementBuilders.Box.Builder setVerticalAlignment(int verticalAlignment)

Sets the vertical alignment of the element inside this LayoutElementBuilders.Box.

LayoutElementBuilders.Box.Builder setWidth(DimensionBuilders.ContainerDimension.Builder widthBuilder)

Sets the width of this LayoutElementBuilders.Box.

LayoutElementBuilders.Box.Builder setWidth(DimensionBuilders.ContainerDimension width)

Sets the width of this LayoutElementBuilders.Box.

Inherited methods

Public methods

addContent

public LayoutElementBuilders.Box.Builder addContent (LayoutElementBuilders.LayoutElement.Builder contentBuilder)

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

Parameters
contentBuilder LayoutElementBuilders.LayoutElement.Builder

Returns
LayoutElementBuilders.Box.Builder

addContent

public LayoutElementBuilders.Box.Builder addContent (LayoutElementBuilders.LayoutElement content)

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

Parameters
content LayoutElementBuilders.LayoutElement

Returns
LayoutElementBuilders.Box.Builder

build

public LayoutElementBuilders.Box build ()

Builds an instance with values accumulated in this Builder.

Returns
LayoutElementBuilders.Box

setHeight

public LayoutElementBuilders.Box.Builder setHeight (DimensionBuilders.ContainerDimension.Builder heightBuilder)

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

Parameters
heightBuilder DimensionBuilders.ContainerDimension.Builder

Returns
LayoutElementBuilders.Box.Builder

setHeight

public LayoutElementBuilders.Box.Builder setHeight (DimensionBuilders.ContainerDimension height)

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

Parameters
height DimensionBuilders.ContainerDimension

Returns
LayoutElementBuilders.Box.Builder

setHorizontalAlignment

public LayoutElementBuilders.Box.Builder setHorizontalAlignment (int horizontalAlignment)

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

Parameters
horizontalAlignment int

Returns
LayoutElementBuilders.Box.Builder

setModifiers

public LayoutElementBuilders.Box.Builder setModifiers (ModifiersBuilders.Modifiers modifiers)

Sets ModifiersBuilders.Modifiers for this element.

Parameters
modifiers ModifiersBuilders.Modifiers

Returns
LayoutElementBuilders.Box.Builder

setModifiers

public LayoutElementBuilders.Box.Builder setModifiers (ModifiersBuilders.Modifiers.Builder modifiersBuilder)

Sets ModifiersBuilders.Modifiers for this element.

Parameters
modifiersBuilder ModifiersBuilders.Modifiers.Builder

Returns
LayoutElementBuilders.Box.Builder

setVerticalAlignment

public LayoutElementBuilders.Box.Builder setVerticalAlignment (int verticalAlignment)

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

Parameters
verticalAlignment int

Returns
LayoutElementBuilders.Box.Builder

setWidth

public LayoutElementBuilders.Box.Builder setWidth (DimensionBuilders.ContainerDimension.Builder widthBuilder)

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

Parameters
widthBuilder DimensionBuilders.ContainerDimension.Builder

Returns
LayoutElementBuilders.Box.Builder

setWidth

public LayoutElementBuilders.Box.Builder setWidth (DimensionBuilders.ContainerDimension width)

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

Parameters
width DimensionBuilders.ContainerDimension

Returns
LayoutElementBuilders.Box.Builder