LayoutElementBuilders.SpanImage.Builder

public static final class LayoutElementBuilders.SpanImage.Builder
extends Object implements LayoutElementBuilders.Span.Builder

java.lang.Object
   ↳ androidx.wear.tiles.builders.LayoutElementBuilders.SpanImage.Builder


Builder for LayoutElementBuilders.SpanImage.

Summary

Public methods

LayoutElementBuilders.SpanImage build()

Builds an instance with values accumulated in this Builder.

LayoutElementBuilders.SpanImage.Builder setAlignment(int alignment)

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

LayoutElementBuilders.SpanImage.Builder setHeight(DimensionBuilders.DpProp.Builder heightBuilder)

Sets the height of this image.

LayoutElementBuilders.SpanImage.Builder setHeight(DimensionBuilders.DpProp height)

Sets the height of this image.

LayoutElementBuilders.SpanImage.Builder setModifiers(ModifiersBuilders.SpanModifiers modifiers)

Sets ModifiersBuilders.Modifiers for this element.

LayoutElementBuilders.SpanImage.Builder setModifiers(ModifiersBuilders.SpanModifiers.Builder modifiersBuilder)

Sets ModifiersBuilders.Modifiers for this element.

LayoutElementBuilders.SpanImage.Builder setResourceId(String resourceId)

Sets the resource_id of the image to render.

LayoutElementBuilders.SpanImage.Builder setWidth(DimensionBuilders.DpProp.Builder widthBuilder)

Sets the width of this image.

LayoutElementBuilders.SpanImage.Builder setWidth(DimensionBuilders.DpProp width)

Sets the width of this image.

Inherited methods

Public methods

build

public LayoutElementBuilders.SpanImage build ()

Builds an instance with values accumulated in this Builder.

Returns
LayoutElementBuilders.SpanImage

setAlignment

public LayoutElementBuilders.SpanImage.Builder setAlignment (int alignment)

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

Parameters
alignment int

Returns
LayoutElementBuilders.SpanImage.Builder

setHeight

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

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

Parameters
heightBuilder DimensionBuilders.DpProp.Builder

Returns
LayoutElementBuilders.SpanImage.Builder

setHeight

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

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

Parameters
height DimensionBuilders.DpProp

Returns
LayoutElementBuilders.SpanImage.Builder

setModifiers

public LayoutElementBuilders.SpanImage.Builder setModifiers (ModifiersBuilders.SpanModifiers modifiers)

Sets ModifiersBuilders.Modifiers for this element.

Parameters
modifiers ModifiersBuilders.SpanModifiers

Returns
LayoutElementBuilders.SpanImage.Builder

setModifiers

public LayoutElementBuilders.SpanImage.Builder setModifiers (ModifiersBuilders.SpanModifiers.Builder modifiersBuilder)

Sets ModifiersBuilders.Modifiers for this element.

Parameters
modifiersBuilder ModifiersBuilders.SpanModifiers.Builder

Returns
LayoutElementBuilders.SpanImage.Builder

setResourceId

public LayoutElementBuilders.SpanImage.Builder setResourceId (String resourceId)

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

Parameters
resourceId String

Returns
LayoutElementBuilders.SpanImage.Builder

setWidth

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

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

Parameters
widthBuilder DimensionBuilders.DpProp.Builder

Returns
LayoutElementBuilders.SpanImage.Builder

setWidth

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

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

Parameters
width DimensionBuilders.DpProp

Returns
LayoutElementBuilders.SpanImage.Builder