ResourceBuilders.Resources

Added in 1.0.0
Deprecated in 1.2.0

public final class ResourceBuilders.Resources


The resources for a layout.

Summary

Nested types

This class is deprecated. Deprecated in Java

Public methods

static @Nullable ResourceBuilders.Resources

This method is deprecated. Deprecated in Java

@NonNull Map<String, ResourceBuilders.ImageResource>

This method is deprecated. Deprecated in Java

@NonNull String

This method is deprecated. Deprecated in Java

@NonNull byte[]

This method is deprecated. Deprecated in Java

Public methods

fromByteArray

Added in 1.1.0
Deprecated in 1.2.0
@TilesExperimental
public static @Nullable ResourceBuilders.Resources fromByteArray(@NonNull byte[] byteArray)

Converts from byte array representation.

getIdToImageMapping

Added in 1.0.0
Deprecated in 1.2.0
public @NonNull Map<String, ResourceBuilders.ImageResource> getIdToImageMapping()

Gets a map of resource_ids to images, which can be used by layouts. Intended for testing purposes only.

getVersion

Added in 1.0.0
Deprecated in 1.2.0
public @NonNull String getVersion()

Gets the version of this Resources instance.

Each tile specifies the version of resources it requires. After fetching a tile, the renderer will use the resources version specified by the tile to separately fetch the resources.

This value must match the version of the resources required by the tile for the tile to render successfully, and must match the resource version specified in androidx.wear.tiles.RequestBuilders.ResourcesRequest which triggered this request. Intended for testing purposes only.

toByteArray

Added in 1.1.0
Deprecated in 1.2.0
@TilesExperimental
public @NonNull byte[] toByteArray()

Converts to byte array representation.