public final class

ProtoLayoutViewInstance.Config.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.wear.protolayout.renderer.impl.ProtoLayoutViewInstance.Config.Builder

Overview

Builder for ProtoLayoutViewInstance.Config.

Summary

Constructors
publicBuilder(Context uiContext, ListeningExecutorService uiExecutorService, ListeningExecutorService bgExecutorService, java.lang.String clickableIdExtra)

Builder for the ProtoLayoutViewInstance.Config class.

Methods
public ProtoLayoutViewInstance.Config.BuilderaddPlatformDataProvider(PlatformDataProvider platformDataProvider, PlatformDataKey<DynamicBuilders.DynamicType> supportedKeys[])

Adds a PlatformDataProvider for accessing supportedKeys.

public ProtoLayoutViewInstance.Configbuild()

Builds ProtoLayoutViewInstance.Config object.

public ProtoLayoutViewInstance.Config.BuildersetAdaptiveUpdateRatesEnabled(boolean adaptiveUpdateRatesEnabled)

Sets whether adaptive updates rates is enabled.

public ProtoLayoutViewInstance.Config.BuildersetAllowLayoutChangingBindsWithoutDefault(boolean allowLayoutChangingBindsWithoutDefault)

Sets whether a "layout changing" data bind can be applied without the "value_for_layout" field being filled in, or being set to zero / empty.

public ProtoLayoutViewInstance.Config.BuildersetAnimationEnabled(boolean animationEnabled)

Sets whether animation are enabled.

public ProtoLayoutViewInstance.Config.BuildersetExtensionViewProvider(ProtoLayoutExtensionViewProvider extensionViewProvider)

Sets provider for the renderer extension.

public ProtoLayoutViewInstance.Config.BuildersetIsViewFullyVisible(boolean isViewFullyVisible)

Sets whether the view is fully visible.

public ProtoLayoutViewInstance.Config.BuildersetLoadActionListener(ProtoLayoutViewInstance.LoadActionListener loadActionListener)

Sets the listener for clicks that will cause contents to be reloaded.

public ProtoLayoutViewInstance.Config.BuildersetLoggingUtils(LoggingUtils loggingUitls)

Sets the debug logger.

public ProtoLayoutViewInstance.Config.BuildersetProtoLayoutTheme(ProtoLayoutTheme protoLayoutTheme)

Sets theme for this ProtoLayout instance.

public ProtoLayoutViewInstance.Config.BuildersetProviderStatsLogger(ProviderStatsLogger providerStatsLogger)

Sets the provider stats logger used for telemetry.

public ProtoLayoutViewInstance.Config.BuildersetRendererResources(Resources rendererResources)

Sets the Android Resources object for the renderer package.

public ProtoLayoutViewInstance.Config.BuildersetResourceResolverProvider(ProtoLayoutViewInstance.ResourceResolversProvider resourceResolversProvider)

Sets provider for resolving resources.

public ProtoLayoutViewInstance.Config.BuildersetRunningAnimationsLimit(int runningAnimationsLimit)

Sets the limit to how much concurrently running animations are allowed.

public ProtoLayoutViewInstance.Config.BuildersetStateStore(StateStore stateStore)

Sets the storage for state updates.

public ProtoLayoutViewInstance.Config.BuildersetUpdatesEnabled(boolean updatesEnabled)

Sets whether sending updates is enabled.

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

Constructors

public Builder(Context uiContext, ListeningExecutorService uiExecutorService, ListeningExecutorService bgExecutorService, java.lang.String clickableIdExtra)

Builder for the ProtoLayoutViewInstance.Config class.

Parameters:

uiContext: Context suitable for interacting with UI.
uiExecutorService: Executor for UI related tasks.
bgExecutorService: Executor for background tasks.
clickableIdExtra: String extra for storing clickable id.

Methods

public ProtoLayoutViewInstance.Config.Builder setResourceResolverProvider(ProtoLayoutViewInstance.ResourceResolversProvider resourceResolversProvider)

Sets provider for resolving resources.

public ProtoLayoutViewInstance.Config.Builder setRendererResources(Resources rendererResources)

Sets the Android Resources object for the renderer package. This can usually be retrieved with android.content.pm.PackageManager. If not specified, this is retrieved from the Ui Context.

public ProtoLayoutViewInstance.Config.Builder setProtoLayoutTheme(ProtoLayoutTheme protoLayoutTheme)

Sets theme for this ProtoLayout instance. If not set, default theme would be used.

public ProtoLayoutViewInstance.Config.Builder addPlatformDataProvider(PlatformDataProvider platformDataProvider, PlatformDataKey<DynamicBuilders.DynamicType> supportedKeys[])

Adds a PlatformDataProvider for accessing supportedKeys.

public ProtoLayoutViewInstance.Config.Builder setStateStore(StateStore stateStore)

Sets the storage for state updates.

Sets the listener for clicks that will cause contents to be reloaded. Defaults to no-op.

public ProtoLayoutViewInstance.Config.Builder setExtensionViewProvider(ProtoLayoutExtensionViewProvider extensionViewProvider)

Sets provider for the renderer extension.

public ProtoLayoutViewInstance.Config.Builder setLoggingUtils(LoggingUtils loggingUitls)

Sets the debug logger.

public ProtoLayoutViewInstance.Config.Builder setProviderStatsLogger(ProviderStatsLogger providerStatsLogger)

Sets the provider stats logger used for telemetry.

public ProtoLayoutViewInstance.Config.Builder setAnimationEnabled(boolean animationEnabled)

Sets whether animation are enabled. If disabled, none of the animation will be played.

public ProtoLayoutViewInstance.Config.Builder setRunningAnimationsLimit(int runningAnimationsLimit)

Sets the limit to how much concurrently running animations are allowed.

public ProtoLayoutViewInstance.Config.Builder setUpdatesEnabled(boolean updatesEnabled)

Sets whether sending updates is enabled.

public ProtoLayoutViewInstance.Config.Builder setAdaptiveUpdateRatesEnabled(boolean adaptiveUpdateRatesEnabled)

Sets whether adaptive updates rates is enabled.

public ProtoLayoutViewInstance.Config.Builder setIsViewFullyVisible(boolean isViewFullyVisible)

Sets whether the view is fully visible.

public ProtoLayoutViewInstance.Config.Builder setAllowLayoutChangingBindsWithoutDefault(boolean allowLayoutChangingBindsWithoutDefault)

Sets whether a "layout changing" data bind can be applied without the "value_for_layout" field being filled in, or being set to zero / empty. Defaults to false.

This is to support legacy apps which use layout-changing data bind before the full support was built.

Builds ProtoLayoutViewInstance.Config object.