LayoutElementBuilders.Row.Builder
public final class LayoutElementBuilders.Row.Builder
Builder for Row
.
Summary
Public methods
addContent
@RequiresSchemaVersion(major = 1, minor = 0)
public @NonNull LayoutElementBuilders.Row.Builder addContent(@NonNull LayoutElementBuilders.LayoutElement content)
Adds one item to the list of child elements to place inside this Row
.
build
public @NonNull LayoutElementBuilders.Row build()
Builds an instance from accumulated values.
setHeight
@RequiresSchemaVersion(major = 1, minor = 0)
public @NonNull LayoutElementBuilders.Row.Builder setHeight(@NonNull 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).
setModifiers
@RequiresSchemaVersion(major = 1, minor = 0)
public @NonNull LayoutElementBuilders.Row.Builder setModifiers(@NonNull ModifiersBuilders.Modifiers modifiers)
Sets androidx.wear.protolayout.ModifiersBuilders.Modifiers
for this element.
setVerticalAlignment
@RequiresSchemaVersion(major = 1, minor = 0)
public @NonNull 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 VERTICAL_ALIGN_CENTER.
setVerticalAlignment
@RequiresSchemaVersion(major = 1, minor = 0)
public @NonNull LayoutElementBuilders.Row.Builder setVerticalAlignment(
@NonNull LayoutElementBuilders.VerticalAlignmentProp 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 VERTICAL_ALIGN_CENTER.
setWidth
@RequiresSchemaVersion(major = 1, minor = 0)
public @NonNull LayoutElementBuilders.Row.Builder setWidth(@NonNull 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).