# ResourceBuilders.Resources

Artifact: [androidx.wear.tiles:tiles](https://developer.android.com/jetpack/androidx/releases/wear-tiles) [View Source](https://cs.android.com/search?q=file:androidx/wear/tiles/ResourceBuilders.java+class:androidx.wear.tiles.ResourceBuilders.Resources) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.0.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.2.0)

*** ** * ** ***


```
public final class ResourceBuilders.Resources
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
> Deprecated in Java

The resources for a layout.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/wear/tiles/ResourceBuilders.Resources.Builder` **This class is deprecated.** Deprecated in Java |

| ### Public methods |
|---|---|
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/wear/tiles/ResourceBuilders.Resources` | `@https://developer.android.com/reference/androidx/wear/tiles/TilesExperimental [fromByteArray](https://developer.android.com/reference/androidx/wear/tiles/ResourceBuilders.Resources#fromByteArray(byte[]))(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html byte[] byteArray)` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/Map.html<https://developer.android.com/reference/java/lang/String.html, https://developer.android.com/reference/androidx/wear/tiles/ResourceBuilders.ImageResource>` | `[getIdToImageMapping](https://developer.android.com/reference/androidx/wear/tiles/ResourceBuilders.Resources#getIdToImageMapping())()` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `[getVersion](https://developer.android.com/reference/androidx/wear/tiles/ResourceBuilders.Resources#getVersion())()` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html byte[]` | `@https://developer.android.com/reference/androidx/wear/tiles/TilesExperimental [toByteArray](https://developer.android.com/reference/androidx/wear/tiles/ResourceBuilders.Resources#toByteArray())()` **This method is deprecated.** Deprecated in Java |

## Public methods

### fromByteArray

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.1.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.2.0)

```
@TilesExperimental
public static @Nullable ResourceBuilders.Resources [fromByteArray](https://developer.android.com/reference/androidx/wear/tiles/ResourceBuilders.Resources#fromByteArray(byte[]))(@NonNull byte[] byteArray)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Converts from byte array representation.

### getIdToImageMapping

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.0.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.2.0)

```
public @NonNull Map<String, ResourceBuilders.ImageResource> [getIdToImageMapping](https://developer.android.com/reference/androidx/wear/tiles/ResourceBuilders.Resources#getIdToImageMapping())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

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](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.0.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.2.0)

```
public @NonNull String [getVersion](https://developer.android.com/reference/androidx/wear/tiles/ResourceBuilders.Resources#getVersion())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Gets the version of this `https://developer.android.com/reference/androidx/wear/tiles/ResourceBuilders.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 `https://developer.android.com/reference/androidx/wear/tiles/RequestBuilders.ResourcesRequest` which triggered this request. Intended for testing purposes only.

### toByteArray

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.1.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.2.0)

```
@TilesExperimental
public @NonNull byte[] [toByteArray](https://developer.android.com/reference/androidx/wear/tiles/ResourceBuilders.Resources#toByteArray())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Converts to byte array representation.