public final class

LayoutElementBuilders.Image

extends java.lang.Object

implements LayoutElementBuilders.LayoutElement

 java.lang.Object

↳androidx.wear.tiles.LayoutElementBuilders.Image

Overview

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

Methods
public static LayoutElementBuilders.ImagefromProto(LayoutElementProto.Image proto)

public LayoutElementBuilders.ColorFiltergetColorFilter()

Gets filtering parameters for this image.

public LayoutElementBuilders.ContentScaleModePropgetContentScaleMode()

Gets how to scale the image resource inside the bounds specified by width/height if its size does not match those bounds.

public DimensionBuilders.ImageDimensiongetHeight()

Gets the height of this image.

public ModifiersBuilders.ModifiersgetModifiers()

Gets ModifiersBuilders.Modifiers for this element.

public TypeBuilders.StringPropgetResourceId()

Gets the resource_id of the image to render.

public DimensionBuilders.ImageDimensiongetWidth()

Gets the width of this image.

public LayoutElementProto.LayoutElementtoLayoutElementProto()

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods

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.

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

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

public 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.

public ModifiersBuilders.Modifiers getModifiers()

Gets ModifiersBuilders.Modifiers for this element. Intended for testing purposes only.

public LayoutElementBuilders.ColorFilter getColorFilter()

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

public static LayoutElementBuilders.Image fromProto(LayoutElementProto.Image proto)

public LayoutElementProto.LayoutElement toLayoutElementProto()