public final class

LayoutElementBuilders.Spacer.Builder

extends java.lang.Object

implements LayoutElementBuilders.LayoutElement.Builder

 java.lang.Object

↳androidx.wear.protolayout.LayoutElementBuilders.Spacer.Builder

Overview

Builder for LayoutElementBuilders.Spacer.

Summary

Constructors
publicBuilder()

Creates an instance of LayoutElementBuilders.FontWeightProp.Builder.

Methods
public LayoutElementBuilders.Spacerbuild()

public LayoutElementBuilders.Spacer.BuildersetHeight(DimensionBuilders.SpacerDimension height)

Sets the height of this spacer.

public LayoutElementBuilders.Spacer.BuildersetLayoutConstraintsForDynamicHeight(DimensionBuilders.VerticalLayoutConstraint verticalLayoutConstraint)

Sets the bounding constraints for the layout affected by the dynamic value from LayoutElementBuilders.Spacer.Builder.

public LayoutElementBuilders.Spacer.BuildersetLayoutConstraintsForDynamicWidth(DimensionBuilders.HorizontalLayoutConstraint horizontalLayoutConstraint)

Sets the bounding constraints for the layout affected by the dynamic value from LayoutElementBuilders.Spacer.Builder.

public LayoutElementBuilders.Spacer.BuildersetModifiers(ModifiersBuilders.Modifiers modifiers)

Sets ModifiersBuilders.Modifiers for this element.

public LayoutElementBuilders.Spacer.BuildersetWidth(DimensionBuilders.SpacerDimension width)

Sets the width of this LayoutElementBuilders.Spacer.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder()

Creates an instance of LayoutElementBuilders.FontWeightProp.Builder.

Methods

Sets the width of this LayoutElementBuilders.Spacer. When this is added as the direct child of an LayoutElementBuilders.Arc, this must be specified as an angular dimension, otherwise a linear dimension must be used. If not defined, defaults to 0.

While this field is statically accessible from 1.0, it's only bindable since version 1.2 and renderers supporting version 1.2 will use the dynamic value (if set).

When using a dynamic value, make sure to specify the bounding constraints for the affected layout element through setLayoutConstraintsForDynamicWidth(HorizontalLayoutConstraint) otherwise build() fails.

public LayoutElementBuilders.Spacer.Builder setLayoutConstraintsForDynamicWidth(DimensionBuilders.HorizontalLayoutConstraint horizontalLayoutConstraint)

Sets the bounding constraints for the layout affected by the dynamic value from LayoutElementBuilders.Spacer.Builder. If the DimensionBuilders.SpacerDimension does not have a dynamic value, this will be ignored.

Sets the height of this spacer. If not defined, defaults to 0.

While this field is statically accessible from 1.0, it's only bindable since version 1.2 and renderers supporting version 1.2 will use the dynamic value (if set).

When using a dynamic value, make sure to specify the bounding constraints for the affected layout element through setLayoutConstraintsForDynamicWidth(HorizontalLayoutConstraint) otherwise build() fails.

public LayoutElementBuilders.Spacer.Builder setLayoutConstraintsForDynamicHeight(DimensionBuilders.VerticalLayoutConstraint verticalLayoutConstraint)

Sets the bounding constraints for the layout affected by the dynamic value from LayoutElementBuilders.Spacer.Builder. If the DimensionBuilders.SpacerDimension does not have a dynamic value, this will be ignored.

Sets ModifiersBuilders.Modifiers for this element.