public final class

ResourceBuilders.Resources

extends java.lang.Object

 java.lang.Object

↳androidx.wear.protolayout.ResourceBuilders.Resources

Overview

The resources for a layout.

Summary

Methods
public static ResourceBuilders.ResourcesfromProto(ResourceProto.Resources proto)

Creates a new wrapper instance from the proto.

public java.util.Map<java.lang.String, ResourceBuilders.ImageResource>getIdToImageMapping()

Gets a map of resource_ids to images, which can be used by layouts.

public java.lang.StringgetVersion()

Gets the version of this ResourceBuilders.Resources instance.

public ResourceProto.ResourcestoProto()

Returns the internal proto instance.

public java.lang.StringtoString()

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

Methods

public java.lang.String getVersion()

Gets 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 java.util.Map<java.lang.String, ResourceBuilders.ImageResource> getIdToImageMapping()

Gets a map of resource_ids to images, which can be used by layouts.

Creates a new wrapper instance from the proto.

public ResourceProto.Resources toProto()

Returns the internal proto instance.

public java.lang.String toString()