LayoutElementBuilders.SpanImage.Builder

public final class LayoutElementBuilders.SpanImage.Builder implements LayoutElementBuilders.Span.Builder


Builder for SpanImage.

Summary

Public methods

@Override @NonNull LayoutElementBuilders.SpanImage

Builds an instance with values accumulated in this Builder.

@NonNull LayoutElementBuilders.SpanImage.Builder

Sets alignment of this image within the line height of the surrounding .

@NonNull LayoutElementBuilders.SpanImage.Builder

Sets alignment of this image within the line height of the surrounding .

@NonNull LayoutElementBuilders.SpanImage.Builder

Sets the height of this image.

@NonNull LayoutElementBuilders.SpanImage.Builder

Sets the height of this image.

@NonNull LayoutElementBuilders.SpanImage.Builder

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

@NonNull LayoutElementBuilders.SpanImage.Builder

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

@NonNull LayoutElementBuilders.SpanImage.Builder

Sets the resource_id of the image to render.

@NonNull LayoutElementBuilders.SpanImage.Builder

Sets the resource_id of the image to render.

@NonNull LayoutElementBuilders.SpanImage.Builder

Sets the width of this image.

@NonNull LayoutElementBuilders.SpanImage.Builder

Sets the width of this image.

Public methods

build

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

Builds an instance with values accumulated in this Builder.

setAlignment

@NonNull
public LayoutElementBuilders.SpanImage.Builder setAlignment(
    @NonNull LayoutElementBuilders.SpanVerticalAlignmentProp alignment
)

Sets alignment of this image within the line height of the surrounding . If undefined, defaults to SPAN_VERTICAL_ALIGN_BOTTOM.

setAlignment

@NonNull
public LayoutElementBuilders.SpanImage.Builder setAlignment(
    @LayoutElementBuilders.SpanVerticalAlignment @NonNull int alignment
)

Sets alignment of this image within the line height of the surrounding . If undefined, defaults to SPAN_VERTICAL_ALIGN_BOTTOM.

setHeight

@NonNull
public LayoutElementBuilders.SpanImage.Builder setHeight(@NonNull DimensionBuilders.DpProp height)

Sets the height of this image. If not defined, the image will not be rendered.

setHeight

@NonNull
public LayoutElementBuilders.SpanImage.Builder setHeight(@NonNull DimensionBuilders.DpProp.Builder heightBuilder)

Sets the height of this image. If not defined, the image will not be rendered.

setResourceId

@NonNull
public LayoutElementBuilders.SpanImage.Builder setResourceId(@NonNull TypeBuilders.StringProp resourceId)

Sets the resource_id of the image to render. This must exist in the supplied resource bundle.

setResourceId

@NonNull
public LayoutElementBuilders.SpanImage.Builder setResourceId(@NonNull String resourceId)

Sets the resource_id of the image to render. This must exist in the supplied resource bundle.

setWidth

@NonNull
public LayoutElementBuilders.SpanImage.Builder setWidth(@NonNull DimensionBuilders.DpProp width)

Sets the width of this image. If not defined, the image will not be rendered.

setWidth

@NonNull
public LayoutElementBuilders.SpanImage.Builder setWidth(@NonNull DimensionBuilders.DpProp.Builder widthBuilder)

Sets the width of this image. If not defined, the image will not be rendered.