LayoutElementBuilders.SpanImage

public final class LayoutElementBuilders.SpanImage implements LayoutElementBuilders.Span


An image which can be added to a Span.

Summary

Public methods

@Nullable LayoutElementBuilders.SpanVerticalAlignmentProp

Gets alignment of this image within the line height of the surrounding Spannable.

@Nullable DimensionBuilders.DpProp

Gets the height of this image.

@Nullable ModifiersBuilders.SpanModifiers

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

@Nullable TypeBuilders.StringProp

Gets the resource_id of the image to render.

@Nullable DimensionBuilders.DpProp

Gets the width of this image.

Public methods

getAlignment

@Nullable
@NonNull
public LayoutElementBuilders.SpanVerticalAlignmentProp getAlignment()

Gets alignment of this image within the line height of the surrounding Spannable. If undefined, defaults to SPAN_VERTICAL_ALIGN_BOTTOM. Intended for testing purposes only.

getHeight

@Nullable
@NonNull
public DimensionBuilders.DpProp getHeight()

Gets the height of this image. If not defined, the image will not be rendered. Intended for testing purposes only.

getModifiers

@Nullable
@NonNull
public ModifiersBuilders.SpanModifiers getModifiers()

Gets androidx.wear.tiles.ModifiersBuilders.Modifiers for this element. Intended for testing purposes only.

getResourceId

@Nullable
@NonNull
public TypeBuilders.StringProp getResourceId()

Gets the resource_id of the image to render. This must exist in the supplied resource bundle. Intended for testing purposes only.

getWidth

@Nullable
@NonNull
public DimensionBuilders.DpProp getWidth()

Gets the width of this image. If not defined, the image will not be rendered. Intended for testing purposes only.