LayoutElementBuilders.Image

Added in 1.0.0
Deprecated in 1.2.0

public final class LayoutElementBuilders.Image implements LayoutElementBuilders.LayoutElement


An image.

Images used in this element must exist in the resource bundle that corresponds to this layout. Images must have their dimension specified, and will be rendered at this width and height, regardless of their native dimension.

Summary

Nested types

This class is deprecated. Deprecated in Java

Public methods

@Nullable LayoutElementBuilders.ColorFilter

This method is deprecated. Deprecated in Java

@Nullable LayoutElementBuilders.ContentScaleModeProp

This method is deprecated. Deprecated in Java

@Nullable DimensionBuilders.ImageDimension

This method is deprecated. Deprecated in Java

@Nullable ModifiersBuilders.Modifiers

This method is deprecated. Deprecated in Java

@Nullable TypeBuilders.StringProp

This method is deprecated. Deprecated in Java

@Nullable DimensionBuilders.ImageDimension

This method is deprecated. Deprecated in Java

Public methods

getColorFilter

Added in 1.1.0
Deprecated in 1.2.0
public @Nullable LayoutElementBuilders.ColorFilter getColorFilter()

Gets filtering parameters for this image. If not specified, defaults to no filtering.

getContentScaleMode

Added in 1.0.0
Deprecated in 1.2.0
public @Nullable LayoutElementBuilders.ContentScaleModeProp getContentScaleMode()

Gets 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. Intended for testing purposes only.

getHeight

Added in 1.0.0
Deprecated in 1.2.0
public @Nullable DimensionBuilders.ImageDimension getHeight()

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

getModifiers

Added in 1.0.0
Deprecated in 1.2.0
public @Nullable ModifiersBuilders.Modifiers getModifiers()

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

getResourceId

Added in 1.0.0
Deprecated in 1.2.0
public @Nullable 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

Added in 1.0.0
Deprecated in 1.2.0
public @Nullable DimensionBuilders.ImageDimension getWidth()

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