public final class

ResourceBuilders.Resources.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.wear.protolayout.ResourceBuilders.Resources.Builder

Overview

Builder for ResourceBuilders.Resources

Summary

Constructors
publicBuilder()

Creates an instance of ResourceBuilders.AndroidImageResourceByResId.Builder.

Methods
public ResourceBuilders.Resources.BuilderaddIdToImageMapping(java.lang.String id, ResourceBuilders.ImageResource image)

Adds an entry into a map of resource_ids to images, which can be used by layouts.

public ResourceBuilders.Resourcesbuild()

Builds an instance from accumulated values.

public ResourceBuilders.Resources.BuildersetVersion(java.lang.String version)

Sets the version of this ResourceBuilders.Resources instance.

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

Constructors

public Builder()

Creates an instance of ResourceBuilders.AndroidImageResourceByResId.Builder.

Methods

public ResourceBuilders.Resources.Builder setVersion(java.lang.String version)

Sets the version of this ResourceBuilders.Resources instance.

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

This value must match the version of the resources required by the layout for the layout to render successfully, and must match the resource version specified in ResourcesRequest which triggered this request.

public ResourceBuilders.Resources.Builder addIdToImageMapping(java.lang.String id, ResourceBuilders.ImageResource image)

Adds an entry into a map of resource_ids to images, which can be used by layouts.

Builds an instance from accumulated values.