LayoutElementBuilders.Row.Builder

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

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


Builder for LayoutElementBuilders.Row.

Summary

Public methods

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

Adds one item to the list of child elements to place inside this LayoutElementBuilders.Row.

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

Adds one item to the list of child elements to place inside this LayoutElementBuilders.Row.

LayoutElementBuilders.Row build()

Builds an instance with values accumulated in this Builder.

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

Sets the height of this row.

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

Sets the height of this row.

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

Sets ModifiersBuilders.Modifiers for this element.

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

Sets ModifiersBuilders.Modifiers for this element.

LayoutElementBuilders.Row.Builder setVerticalAlignment(int verticalAlignment)

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

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

Sets the width of this row.

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

Sets the width of this row.

Inherited methods

Public methods

addContent

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

Adds one item to the list of child elements to place inside this LayoutElementBuilders.Row.

Parameters
contentBuilder LayoutElementBuilders.LayoutElement.Builder

Returns
LayoutElementBuilders.Row.Builder

addContent

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

Adds one item to the list of child elements to place inside this LayoutElementBuilders.Row.

Parameters
content LayoutElementBuilders.LayoutElement

Returns
LayoutElementBuilders.Row.Builder

build

public LayoutElementBuilders.Row build ()

Builds an instance with values accumulated in this Builder.

Returns
LayoutElementBuilders.Row

setHeight

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

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

Parameters
heightBuilder DimensionBuilders.ContainerDimension.Builder

Returns
LayoutElementBuilders.Row.Builder

setHeight

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

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

Parameters
height DimensionBuilders.ContainerDimension

Returns
LayoutElementBuilders.Row.Builder

setModifiers

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

Sets ModifiersBuilders.Modifiers for this element.

Parameters
modifiers ModifiersBuilders.Modifiers

Returns
LayoutElementBuilders.Row.Builder

setModifiers

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

Sets ModifiersBuilders.Modifiers for this element.

Parameters
modifiersBuilder ModifiersBuilders.Modifiers.Builder

Returns
LayoutElementBuilders.Row.Builder

setVerticalAlignment

public LayoutElementBuilders.Row.Builder setVerticalAlignment (int verticalAlignment)

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

Parameters
verticalAlignment int

Returns
LayoutElementBuilders.Row.Builder

setWidth

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

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

Parameters
widthBuilder DimensionBuilders.ContainerDimension.Builder

Returns
LayoutElementBuilders.Row.Builder

setWidth

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

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

Parameters
width DimensionBuilders.ContainerDimension

Returns
LayoutElementBuilders.Row.Builder