public final class

DynamicTypeEvaluator.Config.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.wear.protolayout.expression.pipeline.DynamicTypeEvaluator.Config.Builder

Overview

Builds a DynamicTypeEvaluator.Config.

Summary

Constructors
publicBuilder()

Methods
public DynamicTypeEvaluator.Config.BuilderaddPlatformDataProvider(PlatformDataProvider platformDataProvider, java.util.Set<PlatformDataKey> supportedDataKeys)

Add a platform data provider and specify the keys it can provide dynamic data for.

public DynamicTypeEvaluator.Configbuild()

public DynamicTypeEvaluator.Config.BuildersetAnimationQuotaManager(QuotaManager value)

Sets the quota manager used for limiting the number of concurrently running animations.

public DynamicTypeEvaluator.Config.BuildersetClock(java.util.function.Supplier<java.time.Instant> clock)

Sets the clock (java.time.Instant supplier) used for providing time data to bindings.

public DynamicTypeEvaluator.Config.BuildersetDynamicTypesQuotaManager(QuotaManager value)

Sets the quota manager used for limiting the total size of dynamic types in the pipeline.

public DynamicTypeEvaluator.Config.BuildersetPlatformTimeUpdateNotifier(PlatformTimeUpdateNotifier notifier)

Sets the notifier used for updating the platform time data.

public DynamicTypeEvaluator.Config.BuildersetStateStore(StateStore value)

Sets the state store that will be used for dereferencing the state keys in the dynamic types.

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

Constructors

public Builder()

Methods

Sets the state store that will be used for dereferencing the state keys in the dynamic types.

If not set, it's the equivalent of setting an empty state store (state bindings will trigger DynamicTypeValueReceiver.onInvalidated()).

public DynamicTypeEvaluator.Config.Builder setAnimationQuotaManager(QuotaManager value)

Sets the quota manager used for limiting the number of concurrently running animations.

If not set, animations are disabled and non-infinite animations will have the end value immediately.

public DynamicTypeEvaluator.Config.Builder setDynamicTypesQuotaManager(QuotaManager value)

Sets the quota manager used for limiting the total size of dynamic types in the pipeline.

If not set, number of dynamic types will not be restricted.

public DynamicTypeEvaluator.Config.Builder addPlatformDataProvider(PlatformDataProvider platformDataProvider, java.util.Set<PlatformDataKey> supportedDataKeys)

Add a platform data provider and specify the keys it can provide dynamic data for.

The provider must support at least one key. If the provider supports multiple keys, they should not be independent, as their values should always update together. One data key must not have multiple providers, or an exception will be thrown.

public DynamicTypeEvaluator.Config.Builder setPlatformTimeUpdateNotifier(PlatformTimeUpdateNotifier notifier)

Sets the notifier used for updating the platform time data. If not set, by default platform time will be updated at 1Hz using a Handler on the main thread.

public DynamicTypeEvaluator.Config.Builder setClock(java.util.function.Supplier<java.time.Instant> clock)

Sets the clock (java.time.Instant supplier) used for providing time data to bindings. If not set, on every reevaluation, platform time for dynamic values will be set to now.