LayoutElementBuilders.Image.Builder
public final class LayoutElementBuilders.Image.Builder implements LayoutElementBuilders.LayoutElement.Builder
Builder for Image.
Summary
Public constructors |
|---|
|
Public methods
build
public @NonNull LayoutElementBuilders.Imagebuild()
Builds an instance with values accumulated in this Builder.
public @NonNull LayoutElementBuilders.Image.BuildersetColorFilter(@NonNull LayoutElementBuilders.ColorFilter colorFilter)
Sets filtering parameters for this image. If not specified, defaults to no filtering.
public @NonNull LayoutElementBuilders.Image.BuildersetContentScaleMode(int contentScaleMode)
Sets how to scale the image resource inside the bounds specified by width/height if its size does not match those bounds. Defaults to CONTENT_SCALE_MODE_FIT.
public @NonNull LayoutElementBuilders.Image.BuildersetContentScaleMode(
@NonNull LayoutElementBuilders.ContentScaleModeProp contentScaleMode
)
Sets how to scale the image resource inside the bounds specified by width/height if its size does not match those bounds. Defaults to CONTENT_SCALE_MODE_FIT.
public @NonNull LayoutElementBuilders.Image.BuildersetHeight(@NonNull DimensionBuilders.ImageDimension height)
Sets the height of this image. If not defined, the image will not be rendered.
public @NonNull LayoutElementBuilders.Image.BuildersetModifiers(@NonNull ModifiersBuilders.Modifiers modifiers)
Sets androidx.wear.tiles.ModifiersBuilders.Modifiers for this element.
public @NonNull LayoutElementBuilders.Image.BuildersetResourceId(@NonNull String resourceId)
Sets the resource_id of the image to render. This must exist in the supplied resource bundle.
public @NonNull LayoutElementBuilders.Image.BuildersetResourceId(@NonNull TypeBuilders.StringProp resourceId)
Sets the resource_id of the image to render. This must exist in the supplied resource bundle.
public @NonNull LayoutElementBuilders.Image.BuildersetWidth(@NonNull DimensionBuilders.ImageDimension width)
Sets the width of this image. If not defined, the image will not be rendered.