LayoutElementBuilders.Box.Builder

public final class LayoutElementBuilders.Box.Builder implements LayoutElementBuilders.LayoutElement.Builder


Builder for Box.

Summary

Public constructors

Public methods

@NonNull LayoutElementBuilders.Box.Builder

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

@Override @NonNull LayoutElementBuilders.Box

Builds an instance with values accumulated in this Builder.

@NonNull LayoutElementBuilders.Box.Builder

Sets the height of this Box.

@NonNull LayoutElementBuilders.Box.Builder

Sets the horizontal alignment of the element inside this Box.

@NonNull LayoutElementBuilders.Box.Builder

Sets the horizontal alignment of the element inside this Box.

@NonNull LayoutElementBuilders.Box.Builder

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

@NonNull LayoutElementBuilders.Box.Builder

Sets the vertical alignment of the element inside this Box.

@NonNull LayoutElementBuilders.Box.Builder

Sets the vertical alignment of the element inside this Box.

@NonNull LayoutElementBuilders.Box.Builder

Sets the width of this Box.

Public constructors

Builder

public Builder()

Public methods

addContent

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

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

build

@Override
@NonNull
public @Override LayoutElementBuilders.Box build()

Builds an instance with values accumulated in this Builder.

setHeight

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

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

setHorizontalAlignment

@NonNull
public LayoutElementBuilders.Box.Builder setHorizontalAlignment(
    @NonNull LayoutElementBuilders.HorizontalAlignmentProp horizontalAlignment
)

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

setHorizontalAlignment

@NonNull
public LayoutElementBuilders.Box.Builder setHorizontalAlignment(
    @LayoutElementBuilders.HorizontalAlignment @NonNull int horizontalAlignment
)

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

setVerticalAlignment

@NonNull
public LayoutElementBuilders.Box.Builder setVerticalAlignment(
    @NonNull LayoutElementBuilders.VerticalAlignmentProp verticalAlignment
)

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

setVerticalAlignment

@NonNull
public LayoutElementBuilders.Box.Builder setVerticalAlignment(
    @LayoutElementBuilders.VerticalAlignment @NonNull int verticalAlignment
)

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

setWidth

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

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