public final class

ResourceProto.HttpImageResource.Builder

extends <any>

implements ResourceProto.HttpImageResourceOrBuilder

 java.lang.Object

↳<any>

↳androidx.wear.protolayout.proto.ResourceProto.HttpImageResource.Builder

Overview

 An image to be loaded from an HTTP source. May not be supported on all
 platforms.
 
Protobuf type androidx.wear.protolayout.proto.HttpImageResource

Summary

Methods
public ResourceProto.HttpImageResource.BuilderclearFormat()

 The format of the image to be fetched.

public ResourceProto.HttpImageResource.BuilderclearHeightPx()

 The native height of the image, in pixels.

public ResourceProto.HttpImageResource.BuilderclearPlaceholderImageResourceId()

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

public ResourceProto.HttpImageResource.BuilderclearUrl()

 The URL from which the image will be fetched.

public ResourceProto.HttpImageResource.BuilderclearWidthPx()

 The native width of the image, in pixels.

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.

public ResourceProto.HttpImageResource.BuildersetFormat(ResourceProto.ImageFormat value)

 The format of the image to be fetched.

public ResourceProto.HttpImageResource.BuildersetFormatValue(int value)

 The format of the image to be fetched.

public ResourceProto.HttpImageResource.BuildersetHeightPx(int value)

 The native height of the image, in pixels.

public ResourceProto.HttpImageResource.BuildersetPlaceholderImageResourceId(java.lang.String value)

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

public ResourceProto.HttpImageResource.BuildersetPlaceholderImageResourceIdBytes(com.google.protobuf.ByteString value)

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

public ResourceProto.HttpImageResource.BuildersetUrl(java.lang.String value)

 The URL from which the image will be fetched.

public ResourceProto.HttpImageResource.BuildersetUrlBytes(com.google.protobuf.ByteString value)

 The URL from which the image will be fetched.

public ResourceProto.HttpImageResource.BuildersetWidthPx(int value)

 The native width of the image, in pixels.

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

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 ResourceProto.HttpImageResource.Builder setUrl(java.lang.String value)

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

Parameters:

value: The url to set.

Returns:

This builder for chaining.

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

Returns:

This builder for chaining.

public ResourceProto.HttpImageResource.Builder setUrlBytes(com.google.protobuf.ByteString value)

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

Parameters:

value: The bytes for url to set.

Returns:

This builder for chaining.

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 ResourceProto.HttpImageResource.Builder setWidthPx(int value)

 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;

Parameters:

value: The widthPx to set.

Returns:

This builder for chaining.

 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:

This builder for chaining.

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 ResourceProto.HttpImageResource.Builder setHeightPx(int value)

 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;

Parameters:

value: The heightPx to set.

Returns:

This builder for chaining.

 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:

This builder for chaining.

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.HttpImageResource.Builder setFormatValue(int value)

 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;

Parameters:

value: The format to set.

Returns:

This builder for chaining.

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.

 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;

Parameters:

value: The enum numeric value on the wire for format to set.

Returns:

This builder for chaining.

 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:

This builder for chaining.

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.

public ResourceProto.HttpImageResource.Builder setPlaceholderImageResourceId(java.lang.String value)

 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;

Parameters:

value: The placeholderImageResourceId to set.

Returns:

This builder for chaining.

public ResourceProto.HttpImageResource.Builder clearPlaceholderImageResourceId()

 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:

This builder for chaining.

public ResourceProto.HttpImageResource.Builder setPlaceholderImageResourceIdBytes(com.google.protobuf.ByteString value)

 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;

Parameters:

value: The bytes for placeholderImageResourceId to set.

Returns:

This builder for chaining.