public final class

LayoutElementBuilders.Image

extends java.lang.Object

implements LayoutElementBuilders.LayoutElement

 java.lang.Object

↳androidx.wear.protolayout.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, Fingerprint fingerprint)

Creates a new wrapper instance from the 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 FingerprintgetFingerprint()

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()

public java.lang.StringtoString()

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, 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.

Gets the width of this image. If not defined, the image will not be rendered.

Gets the height of this image. If not defined, the image will not be rendered.

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.

public ModifiersBuilders.Modifiers getModifiers()

Gets ModifiersBuilders.Modifiers for this element.

public LayoutElementBuilders.ColorFilter getColorFilter()

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

public Fingerprint getFingerprint()

public static LayoutElementBuilders.Image fromProto(LayoutElementProto.Image proto, Fingerprint fingerprint)

Creates a new wrapper instance from the proto.

public LayoutElementProto.LayoutElement toLayoutElementProto()

public java.lang.String toString()