RequestBuilders.ResourcesRequest.Builder


class RequestBuilders.ResourcesRequest.Builder


Builder for ResourcesRequest

Summary

Public constructors

Public functions

RequestBuilders.ResourcesRequest.Builder
addResourceId(resourceId: String)

Adds one item to requested resource IDs.

RequestBuilders.ResourcesRequest

Builds an instance from accumulated values.

RequestBuilders.ResourcesRequest.Builder

Sets the androidx.wear.protolayout.DeviceParametersBuilders.DeviceParameters object describing the device requesting the resources.

RequestBuilders.ResourcesRequest.Builder

This function is deprecated.

Use ( instead.

RequestBuilders.ResourcesRequest.Builder
setTileId(tileId: Int)

Sets the ID of the tile for which resources are being requested.

RequestBuilders.ResourcesRequest.Builder
setVersion(version: String)

Sets the version of the resources being fetched.

Public constructors

Builder

Added in 1.0.0
Builder()

Public functions

addResourceId

Added in 1.0.0
fun addResourceId(resourceId: String): RequestBuilders.ResourcesRequest.Builder

Adds one item to requested resource IDs. This specifies which tile resources should be returned in the androidx.wear.protolayout.ResourceBuilders.Resources response. If not specified, all resources for the given version must be provided in the response.

Note that resource IDs here correspond to tile resources (i.e. keys that would be used in androidx.wear.protolayout.ResourceBuilders.Resources.idToImage), not Android resource names or similar.

build

Added in 1.0.0
fun build(): RequestBuilders.ResourcesRequest

Builds an instance from accumulated values.

setDeviceConfiguration

Added in 1.2.0
fun setDeviceConfiguration(
    deviceConfiguration: DeviceParametersBuilders.DeviceParameters
): RequestBuilders.ResourcesRequest.Builder

Sets the androidx.wear.protolayout.DeviceParametersBuilders.DeviceParameters object describing the device requesting the resources.

setDeviceParameters

Added in 1.0.0
Deprecated in 1.2.0
fun setDeviceParameters(
    deviceParameters: DeviceParametersBuilders.DeviceParameters
): RequestBuilders.ResourcesRequest.Builder

Sets the androidx.wear.tiles.DeviceParametersBuilders.DeviceParameters describing the device requesting the resources.

setTileId

Added in 1.2.0
fun setTileId(tileId: Int): RequestBuilders.ResourcesRequest.Builder

Sets the ID of the tile for which resources are being requested.

setVersion

Added in 1.0.0
fun setVersion(version: String): RequestBuilders.ResourcesRequest.Builder

Sets the version of the resources being fetched. This is the same as the requested resource version, passed in androidx.wear.tiles.TileBuilders.Tile.