public interface

ResourceProto.HttpImageResourceOrBuilder

 androidx.wear.protolayout.proto.ResourceProto.HttpImageResourceOrBuilder

Subclasses:

ResourceProto.HttpImageResource, ResourceProto.HttpImageResource.Builder

Summary

Methods
public ResourceProto.ImageFormatgetFormat()

 The format of the image to be fetched.

public intgetFormatValue()

 The format of the image to be fetched.

public intgetHeightPx()

 The native height of the image, in pixels.

public java.lang.StringgetPlaceholderImageResourceId()

 Resource ID to look up in Resources#id_to_image to provide a placeholder
 image.

public com.google.protobuf.ByteStringgetPlaceholderImageResourceIdBytes()

 Resource ID to look up in Resources#id_to_image to provide a placeholder
 image.

public java.lang.StringgetUrl()

 The URL from which the image will be fetched.

public com.google.protobuf.ByteStringgetUrlBytes()

 The URL from which the image will be fetched.

public intgetWidthPx()

 The native width of the image, in pixels.

Methods

public java.lang.String getUrl()

 The URL from which the image will be fetched.
 
string url = 1;

Returns:

The url.

public com.google.protobuf.ByteString getUrlBytes()

 The URL from which the image will be fetched.
 
string url = 1;

Returns:

The bytes for url.

public int getWidthPx()

 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.
 
int32 width_px = 2;

Returns:

The widthPx.

public int getHeightPx()

 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.
 
int32 height_px = 3;

Returns:

The heightPx.

public int getFormatValue()

 The format of the image to be fetched. 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.
 
.androidx.wear.protolayout.proto.ImageFormat format = 4;

Returns:

The enum numeric value on the wire for format.

public ResourceProto.ImageFormat getFormat()

 The format of the image to be fetched. 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.
 
.androidx.wear.protolayout.proto.ImageFormat format = 4;

Returns:

The format.

public java.lang.String getPlaceholderImageResourceId()

 Resource ID to look up in Resources#id_to_image to provide a placeholder
 image. The placeholder image will be drawn in the Image or SpanImage
 element which references this resource while the HTTP image is loading.
 Note that this must not point to another HttpImageResource; it should point
 to an image resource which can be immediately loaded.

 If this is empty, no placeholder image will be used (i.e. the Image or
 SpanImage will remain transparent until the image has loaded).
 
string placeholder_image_resource_id = 5;

Returns:

The placeholderImageResourceId.

public com.google.protobuf.ByteString getPlaceholderImageResourceIdBytes()

 Resource ID to look up in Resources#id_to_image to provide a placeholder
 image. The placeholder image will be drawn in the Image or SpanImage
 element which references this resource while the HTTP image is loading.
 Note that this must not point to another HttpImageResource; it should point
 to an image resource which can be immediately loaded.

 If this is empty, no placeholder image will be used (i.e. the Image or
 SpanImage will remain transparent until the image has loaded).
 
string placeholder_image_resource_id = 5;

Returns:

The bytes for placeholderImageResourceId.