public final class

ResourceBuilders.InlineImageResource

extends java.lang.Object

 java.lang.Object

↳androidx.wear.protolayout.ResourceBuilders.InlineImageResource

Overview

An image resource whose data is fully inlined, with no dependency on a system or app resource.

Summary

Methods
public static ResourceBuilders.InlineImageResourcefromProto(ResourceProto.InlineImageResource proto)

Creates a new wrapper instance from the proto.

public byte[]getData()

Gets the byte array representing the image.

public intgetFormat()

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

public intgetHeightPx()

Gets the native height of the image, in pixels.

public intgetWidthPx()

Gets the native width of the image, in pixels.

public ResourceProto.InlineImageResourcetoProto()

Returns the internal proto instance.

public java.lang.StringtoString()

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

Methods

public byte[] getData()

Gets the byte array representing the image.

public int getWidthPx()

Gets 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 int getHeightPx()

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

public int getFormat()

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

Creates a new wrapper instance from the proto.

Returns the internal proto instance.

public java.lang.String toString()