LayoutElementBuilders.Column.Builder
public final class LayoutElementBuilders.Column.Builder
Builder for Column
.
Summary
Public methods
addContent
@RequiresSchemaVersion(major = 1, minor = 0)
public @NonNull LayoutElementBuilders.Column.Builder addContent(@NonNull LayoutElementBuilders.LayoutElement content)
Adds one item to the list of child elements to place inside this Column
.
build
public @NonNull LayoutElementBuilders.Column build()
Builds an instance from accumulated values.
setHeight
@RequiresSchemaVersion(major = 1, minor = 0)
public @NonNull LayoutElementBuilders.Column.Builder setHeight(@NonNull DimensionBuilders.ContainerDimension height)
Sets the height of this column. If not defined, this will size itself to fit all of its children (i.e. a WrappedDimension).
setHorizontalAlignment
@RequiresSchemaVersion(major = 1, minor = 0)
public @NonNull LayoutElementBuilders.Column.Builder setHorizontalAlignment(int horizontalAlignment)
Sets the horizontal alignment of elements inside this column, if they are narrower than the resulting width of the column. If not defined, defaults to HORIZONTAL_ALIGN_CENTER.
setHorizontalAlignment
@RequiresSchemaVersion(major = 1, minor = 0)
public @NonNull LayoutElementBuilders.Column.Builder setHorizontalAlignment(
@NonNull LayoutElementBuilders.HorizontalAlignmentProp horizontalAlignment
)
Sets the horizontal alignment of elements inside this column, if they are narrower than the resulting width of the column. If not defined, defaults to HORIZONTAL_ALIGN_CENTER.
setModifiers
@RequiresSchemaVersion(major = 1, minor = 0)
public @NonNull LayoutElementBuilders.Column.Builder setModifiers(@NonNull ModifiersBuilders.Modifiers modifiers)
Sets androidx.wear.protolayout.ModifiersBuilders.Modifiers
for this element.
setWidth
@RequiresSchemaVersion(major = 1, minor = 0)
public @NonNull LayoutElementBuilders.Column.Builder setWidth(@NonNull DimensionBuilders.ContainerDimension width)
Sets the width of this column. If not defined, this will size itself to fit all of its children (i.e. a WrappedDimension).