public final class

ResourceBuilders.InlineImageResource.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.wear.protolayout.ResourceBuilders.InlineImageResource.Builder

Overview

Builder for ResourceBuilders.InlineImageResource

Summary

Constructors
publicBuilder()

Creates an instance of ResourceBuilders.AndroidImageResourceByResId.Builder.

Methods
public ResourceBuilders.InlineImageResourcebuild()

Builds an instance from accumulated values.

public ResourceBuilders.InlineImageResource.BuildersetData(byte[] data[])

Sets the byte array representing the image.

public ResourceBuilders.InlineImageResource.BuildersetFormat(int format)

Sets the format of the byte array data representing the image.

public ResourceBuilders.InlineImageResource.BuildersetHeightPx(int heightPx)

Sets the native height of the image, in pixels.

public ResourceBuilders.InlineImageResource.BuildersetWidthPx(int widthPx)

Sets the native width of the image, in pixels.

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

Constructors

public Builder()

Creates an instance of ResourceBuilders.AndroidImageResourceByResId.Builder.

Methods

public ResourceBuilders.InlineImageResource.Builder setData(byte[] data[])

Sets the byte array representing the image.

public ResourceBuilders.InlineImageResource.Builder setWidthPx(int widthPx)

Sets the native width of the image, in pixels. Only required for formats (e.g. IMAGE_FORMAT_RGB_565) where the image data does not include size.

public ResourceBuilders.InlineImageResource.Builder setHeightPx(int heightPx)

Sets the native height of the image, in pixels. Only required for formats (e.g. IMAGE_FORMAT_RGB_565) where the image data does not include size.

Sets the format of the byte array data representing the image. May be left unspecified or set to IMAGE_FORMAT_UNDEFINED in which case the platform will attempt to extract this from the raw image data. If the platform does not support the format, the image will not be decoded or displayed.

Builds an instance from accumulated values.