LayoutElementBuilders.SpanImage.Builder
class LayoutElementBuilders.SpanImage.Builder
Builder for SpanImage
.
Summary
Public functions
build
fun build(): LayoutElementBuilders.SpanImage
Builds an instance with values accumulated in this Builder.
setAlignment
@RequiresSchemaVersion(major = 1, minor = 0)
fun setAlignment(alignment: Int): LayoutElementBuilders.SpanImage.Builder
Sets alignment of this image within the line height of the surrounding . If undefined, defaults to SPAN_VERTICAL_ALIGN_BOTTOM.
setAlignment
@RequiresSchemaVersion(major = 1, minor = 0)
fun setAlignment(
alignment: LayoutElementBuilders.SpanVerticalAlignmentProp
): LayoutElementBuilders.SpanImage.Builder
Sets alignment of this image within the line height of the surrounding . If undefined, defaults to SPAN_VERTICAL_ALIGN_BOTTOM.
setHeight
@RequiresSchemaVersion(major = 1, minor = 0)
fun setHeight(height: DimensionBuilders.DpProp): LayoutElementBuilders.SpanImage.Builder
Sets the height of this image. If not defined, the image will not be rendered.
Note that this field only supports static values.
setModifiers
@RequiresSchemaVersion(major = 1, minor = 0)
fun setModifiers(modifiers: ModifiersBuilders.SpanModifiers): LayoutElementBuilders.SpanImage.Builder
Sets androidx.wear.protolayout.ModifiersBuilders.Modifiers
for this element.
setResourceId
@RequiresSchemaVersion(major = 1, minor = 0)
fun setResourceId(resourceId: String): LayoutElementBuilders.SpanImage.Builder
Sets the resource_id of the image to render. This must exist in the supplied resource bundle.
setResourceId
@RequiresSchemaVersion(major = 1, minor = 0)
fun setResourceId(resourceId: TypeBuilders.StringProp): LayoutElementBuilders.SpanImage.Builder
Sets the resource_id of the image to render. This must exist in the supplied resource bundle.
Note that this field only supports static values.
setWidth
@RequiresSchemaVersion(major = 1, minor = 0)
fun setWidth(width: DimensionBuilders.DpProp): LayoutElementBuilders.SpanImage.Builder
Sets the width of this image. If not defined, the image will not be rendered.
Note that this field only supports static values.