public final class

ProtoLayoutDynamicDataPipeline.PipelineMaker

extends java.lang.Object

 java.lang.Object

↳androidx.wear.protolayout.renderer.dynamicdata.ProtoLayoutDynamicDataPipeline.PipelineMaker

Overview

PipelineMaker for a dynamic data pipeline.

Given a dynamic ProtoLayout data source, this creates a sequence of BoundDynamicType instances, which can source the required data, and transform it into its final form.

The nodes are accumulated and can be committed to the pipeline.

Note that this class is not thread-safe.

Summary

Methods
public ProtoLayoutDynamicDataPipeline.PipelineMakeraddPipelineFor(ColorProto.ColorProp colorProp, int invalidData, java.lang.String posId, java.util.function.Consumer<java.lang.Integer> consumer)

Add the given source to the pipeline for future evaluation.

public ProtoLayoutDynamicDataPipeline.PipelineMakeraddPipelineFor(ColorProto.ColorProp colorProp, java.lang.String posId, DynamicTypeValueReceiver<java.lang.Integer> consumer)

Add the given source to the pipeline for future evaluation.

public ProtoLayoutDynamicDataPipeline.PipelineMakeraddPipelineFor(DimensionProto.DegreesProp degreesProp, float invalidData, java.lang.String posId, java.util.function.Consumer<java.lang.Float> consumer)

Add the given source to the pipeline for future evaluation.

public ProtoLayoutDynamicDataPipeline.PipelineMakeraddPipelineFor(DimensionProto.DegreesProp degreesProp, java.lang.String posId, DynamicTypeValueReceiver<java.lang.Float> consumer)

Add the given source to the pipeline for future evaluation.

public ProtoLayoutDynamicDataPipeline.PipelineMakeraddPipelineFor(DimensionProto.DpProp dpProp, float invalidData, java.lang.String posId, java.util.function.Consumer<java.lang.Float> consumer)

Add the given source to the pipeline for future evaluation.

public ProtoLayoutDynamicDataPipeline.PipelineMakeraddPipelineFor(DimensionProto.DpProp dpProp, java.lang.String posId, DynamicTypeValueReceiver<java.lang.Float> consumer)

Add the given source to the pipeline for future evaluation.

public ProtoLayoutDynamicDataPipeline.PipelineMakeraddPipelineFor(DynamicProto.DynamicBool boolSource, boolean invalidData, java.lang.String posId, java.util.function.Consumer<java.lang.Boolean> consumer)

Add the given source to the pipeline for future evaluation.

public ProtoLayoutDynamicDataPipeline.PipelineMakeraddPipelineFor(DynamicProto.DynamicBool boolSource, java.lang.String posId, DynamicTypeValueReceiver<java.lang.Boolean> consumer)

Add the given source to the pipeline for future evaluation.

public ProtoLayoutDynamicDataPipeline.PipelineMakeraddPipelineFor(DynamicProto.DynamicBool boolSource, java.lang.String posId, java.lang.Runnable triggerAnimationRunnable)

Add the given source to the pipeline for future evaluation.

public ProtoLayoutDynamicDataPipeline.PipelineMakeraddPipelineFor(DynamicProto.DynamicColor colorSource, java.lang.String posId, DynamicTypeValueReceiver<java.lang.Integer> consumer)

Add the given source to the pipeline for future evaluation.

public ProtoLayoutDynamicDataPipeline.PipelineMakeraddPipelineFor(DynamicProto.DynamicFloat floatSource, float invalidData, java.lang.String posId, java.util.function.Consumer<java.lang.Float> consumer)

Add the given source to the pipeline for future evaluation.

public ProtoLayoutDynamicDataPipeline.PipelineMakeraddPipelineFor(DynamicProto.DynamicFloat floatSource, java.lang.String posId, DynamicTypeValueReceiver<java.lang.Float> consumer)

Add the given source to the pipeline for future evaluation.

public ProtoLayoutDynamicDataPipeline.PipelineMakeraddPipelineFor(DynamicProto.DynamicInt32 int32Source, java.lang.String posId, DynamicTypeValueReceiver<java.lang.Integer> consumer)

Add the given source to the pipeline for future evaluation.

public ProtoLayoutDynamicDataPipeline.PipelineMakeraddPipelineFor(DynamicProto.DynamicString stringSource, java.util.Locale locale, java.lang.String posId, DynamicTypeValueReceiver<java.lang.String> consumer)

Add the given source to the pipeline for future evaluation.

public ProtoLayoutDynamicDataPipeline.PipelineMakeraddPipelineFor(DynamicProto.DynamicString stringSource, java.lang.String invalidData, java.util.Locale locale, java.lang.String posId, java.util.function.Consumer<java.lang.String> consumer)

Add the given source to the pipeline for future evaluation.

public ProtoLayoutDynamicDataPipeline.PipelineMakeraddPipelineFor(TypesProto.BoolProp boolProp, boolean invalidData, java.lang.String posId, java.util.function.Consumer<java.lang.Boolean> consumer)

Add the given source to the pipeline for future evaluation.

public ProtoLayoutDynamicDataPipeline.PipelineMakeraddPipelineFor(TypesProto.BoolProp boolProp, java.lang.String posId, DynamicTypeValueReceiver<java.lang.Boolean> consumer)

Add the given source to the pipeline for future evaluation.

public ProtoLayoutDynamicDataPipeline.PipelineMakeraddResolvedAnimatedImage(AnimatedVectorDrawable drawable, TriggerProto.Trigger trigger, java.lang.String posId)

This store method shall be called during the layout inflation in a background thread.

public ProtoLayoutDynamicDataPipeline.PipelineMakeraddResolvedAnimatedImageWithBoolTrigger(AnimatedVectorDrawable drawable, TriggerProto.Trigger trigger, java.lang.String posId, DynamicProto.DynamicBool boolTrigger)

This store method shall be called during the layout inflation in a background thread.

public ProtoLayoutDynamicDataPipeline.PipelineMakeraddResolvedSeekableAnimatedImage(SeekableAnimatedVectorDrawable seekableDrawable, DynamicProto.DynamicFloat boundProgress, java.lang.String posId)

This store method shall be called during the layout inflation in a background thread.

public voidclearDataPipelineAndCommit(ViewGroup inflatedParent, boolean isReattaching)

Clears the current data in the ProtoLayoutDynamicDataPipeline instance that was used to create this and then commits any stored changes.

public voidcommit(ViewGroup inflatedParent, boolean isReattaching)

Commits any stored changes into the ProtoLayoutDynamicDataPipeline instance that was used to create this.

public ProtoLayoutDynamicDataPipeline.PipelineMakermarkForChildRemoval(java.lang.String nodePosId)

Add the given source to the pipeline for future evaluation.

public ProtoLayoutDynamicDataPipeline.PipelineMakermarkNodeAsChanged(java.lang.String posId, boolean includePreviousChildren)

Mark the node posId as changed.

public voidplayExitAnimations(ViewGroup parentView, boolean isReattaching, java.lang.Runnable onEnd)

Plays Exit animations.

public ProtoLayoutDynamicDataPipeline.PipelineMakerrememberNode(java.lang.String nodePosId)

Stores a node if doesn't exist.

public ProtoLayoutDynamicDataPipeline.PipelineMakerstoreAnimatedVisibilityFor(java.lang.String posId, ModifiersProto.AnimatedVisibility animatedVisibility)

Stores the ModifiersProto.AnimatedVisibility associated with the posId.

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

Methods

public void clearDataPipelineAndCommit(ViewGroup inflatedParent, boolean isReattaching)

Clears the current data in the ProtoLayoutDynamicDataPipeline instance that was used to create this and then commits any stored changes.

Parameters:

inflatedParent: The renderer-owned parent view for all of the layout elements associated with the nodes in this pipeline. This will be used for content transition animations.
isReattaching: if True, this layout is being reattached and will skip content transition animations.

public void playExitAnimations(ViewGroup parentView, boolean isReattaching, java.lang.Runnable onEnd)

Plays Exit animations. This method should be called while parentView still corresponds to the previous layout. Any subsequent change to the layout should be schedule through the onEnd callback.

Parameters:

parentView: The parent view these nodes are being inflated into. Note that it should be attached to a window (and has gone through its layout passes).
isReattaching: if True, this layout is being reattached and will skip content transition animations.
onEnd: the callback to execute after all Exit animations have finished.

public void commit(ViewGroup inflatedParent, boolean isReattaching)

Commits any stored changes into the ProtoLayoutDynamicDataPipeline instance that was used to create this. This replaces any already available node and should be called only once per layout update.

Parameters:

inflatedParent: The parent view these nodes are being inflated into. This will be used for Enter animations. If this view is not attached to a window, the animations (and the rest of pipeline init) will be scheduled to run when the view attaches to a window later
isReattaching: if True, this layout is being reattached and will skip content transition animations.

public ProtoLayoutDynamicDataPipeline.PipelineMaker addPipelineFor(DynamicProto.DynamicString stringSource, java.util.Locale locale, java.lang.String posId, DynamicTypeValueReceiver<java.lang.String> consumer)

Add the given source to the pipeline for future evaluation. Evaluation will start when ProtoLayoutDynamicDataPipeline.PipelineMaker is committed with ProtoLayoutDynamicDataPipeline.PipelineMaker.commit(ViewGroup, boolean).

public ProtoLayoutDynamicDataPipeline.PipelineMaker addPipelineFor(DynamicProto.DynamicInt32 int32Source, java.lang.String posId, DynamicTypeValueReceiver<java.lang.Integer> consumer)

Add the given source to the pipeline for future evaluation. Evaluation will start when ProtoLayoutDynamicDataPipeline.PipelineMaker is committed with ProtoLayoutDynamicDataPipeline.PipelineMaker.commit(ViewGroup, boolean).

public ProtoLayoutDynamicDataPipeline.PipelineMaker addPipelineFor(DynamicProto.DynamicString stringSource, java.lang.String invalidData, java.util.Locale locale, java.lang.String posId, java.util.function.Consumer<java.lang.String> consumer)

Add the given source to the pipeline for future evaluation. Evaluation will start when ProtoLayoutDynamicDataPipeline.PipelineMaker is committed with ProtoLayoutDynamicDataPipeline.PipelineMaker.commit(ViewGroup, boolean).

public ProtoLayoutDynamicDataPipeline.PipelineMaker addPipelineFor(DynamicProto.DynamicFloat floatSource, java.lang.String posId, DynamicTypeValueReceiver<java.lang.Float> consumer)

Add the given source to the pipeline for future evaluation. Evaluation will start when ProtoLayoutDynamicDataPipeline.PipelineMaker is committed with ProtoLayoutDynamicDataPipeline.PipelineMaker.commit(ViewGroup, boolean).

public ProtoLayoutDynamicDataPipeline.PipelineMaker addPipelineFor(DynamicProto.DynamicFloat floatSource, float invalidData, java.lang.String posId, java.util.function.Consumer<java.lang.Float> consumer)

Add the given source to the pipeline for future evaluation. Evaluation will start when ProtoLayoutDynamicDataPipeline.PipelineMaker is committed with ProtoLayoutDynamicDataPipeline.PipelineMaker.commit(ViewGroup, boolean).

public ProtoLayoutDynamicDataPipeline.PipelineMaker addPipelineFor(DynamicProto.DynamicColor colorSource, java.lang.String posId, DynamicTypeValueReceiver<java.lang.Integer> consumer)

Add the given source to the pipeline for future evaluation. Evaluation will start when ProtoLayoutDynamicDataPipeline.PipelineMaker is committed with ProtoLayoutDynamicDataPipeline.PipelineMaker.commit(ViewGroup, boolean).

public ProtoLayoutDynamicDataPipeline.PipelineMaker addPipelineFor(DynamicProto.DynamicBool boolSource, java.lang.String posId, java.lang.Runnable triggerAnimationRunnable)

Add the given source to the pipeline for future evaluation. Evaluation will start when ProtoLayoutDynamicDataPipeline.PipelineMaker is committed with ProtoLayoutDynamicDataPipeline.PipelineMaker.commit(ViewGroup, boolean).

public ProtoLayoutDynamicDataPipeline.PipelineMaker addPipelineFor(DynamicProto.DynamicBool boolSource, java.lang.String posId, DynamicTypeValueReceiver<java.lang.Boolean> consumer)

Add the given source to the pipeline for future evaluation. Evaluation will start when ProtoLayoutDynamicDataPipeline.PipelineMaker is committed with ProtoLayoutDynamicDataPipeline.PipelineMaker.commit(ViewGroup, boolean).

public ProtoLayoutDynamicDataPipeline.PipelineMaker addPipelineFor(DynamicProto.DynamicBool boolSource, boolean invalidData, java.lang.String posId, java.util.function.Consumer<java.lang.Boolean> consumer)

Add the given source to the pipeline for future evaluation. Evaluation will start when ProtoLayoutDynamicDataPipeline.PipelineMaker is committed with ProtoLayoutDynamicDataPipeline.PipelineMaker.commit(ViewGroup, boolean).

public ProtoLayoutDynamicDataPipeline.PipelineMaker addPipelineFor(DimensionProto.DpProp dpProp, java.lang.String posId, DynamicTypeValueReceiver<java.lang.Float> consumer)

Add the given source to the pipeline for future evaluation. Evaluation will start when ProtoLayoutDynamicDataPipeline.PipelineMaker is committed with ProtoLayoutDynamicDataPipeline.PipelineMaker.commit(ViewGroup, boolean).

public ProtoLayoutDynamicDataPipeline.PipelineMaker addPipelineFor(DimensionProto.DegreesProp degreesProp, java.lang.String posId, DynamicTypeValueReceiver<java.lang.Float> consumer)

Add the given source to the pipeline for future evaluation. Evaluation will start when ProtoLayoutDynamicDataPipeline.PipelineMaker is committed with ProtoLayoutDynamicDataPipeline.PipelineMaker.commit(ViewGroup, boolean).

public ProtoLayoutDynamicDataPipeline.PipelineMaker addPipelineFor(ColorProto.ColorProp colorProp, java.lang.String posId, DynamicTypeValueReceiver<java.lang.Integer> consumer)

Add the given source to the pipeline for future evaluation. Evaluation will start when ProtoLayoutDynamicDataPipeline.PipelineMaker is committed with ProtoLayoutDynamicDataPipeline.PipelineMaker.commit(ViewGroup, boolean).

public ProtoLayoutDynamicDataPipeline.PipelineMaker addPipelineFor(TypesProto.BoolProp boolProp, java.lang.String posId, DynamicTypeValueReceiver<java.lang.Boolean> consumer)

Add the given source to the pipeline for future evaluation. Evaluation will start when ProtoLayoutDynamicDataPipeline.PipelineMaker is committed with ProtoLayoutDynamicDataPipeline.PipelineMaker.commit(ViewGroup, boolean).

public ProtoLayoutDynamicDataPipeline.PipelineMaker addPipelineFor(DimensionProto.DpProp dpProp, float invalidData, java.lang.String posId, java.util.function.Consumer<java.lang.Float> consumer)

Add the given source to the pipeline for future evaluation. Evaluation will start when ProtoLayoutDynamicDataPipeline.PipelineMaker is committed with ProtoLayoutDynamicDataPipeline.PipelineMaker.commit(ViewGroup, boolean).

public ProtoLayoutDynamicDataPipeline.PipelineMaker addPipelineFor(DimensionProto.DegreesProp degreesProp, float invalidData, java.lang.String posId, java.util.function.Consumer<java.lang.Float> consumer)

Add the given source to the pipeline for future evaluation. Evaluation will start when ProtoLayoutDynamicDataPipeline.PipelineMaker is committed with ProtoLayoutDynamicDataPipeline.PipelineMaker.commit(ViewGroup, boolean).

public ProtoLayoutDynamicDataPipeline.PipelineMaker addPipelineFor(ColorProto.ColorProp colorProp, int invalidData, java.lang.String posId, java.util.function.Consumer<java.lang.Integer> consumer)

Add the given source to the pipeline for future evaluation. Evaluation will start when ProtoLayoutDynamicDataPipeline.PipelineMaker is committed with ProtoLayoutDynamicDataPipeline.PipelineMaker.commit(ViewGroup, boolean).

public ProtoLayoutDynamicDataPipeline.PipelineMaker addPipelineFor(TypesProto.BoolProp boolProp, boolean invalidData, java.lang.String posId, java.util.function.Consumer<java.lang.Boolean> consumer)

Add the given source to the pipeline for future evaluation. Evaluation will start when ProtoLayoutDynamicDataPipeline.PipelineMaker is committed with ProtoLayoutDynamicDataPipeline.PipelineMaker.commit(ViewGroup, boolean).

public ProtoLayoutDynamicDataPipeline.PipelineMaker addResolvedAnimatedImage(AnimatedVectorDrawable drawable, TriggerProto.Trigger trigger, java.lang.String posId)

This store method shall be called during the layout inflation in a background thread.

public ProtoLayoutDynamicDataPipeline.PipelineMaker addResolvedAnimatedImageWithBoolTrigger(AnimatedVectorDrawable drawable, TriggerProto.Trigger trigger, java.lang.String posId, DynamicProto.DynamicBool boolTrigger)

This store method shall be called during the layout inflation in a background thread. It adds given DynamicProto.DynamicBool to the pipeline too.

public ProtoLayoutDynamicDataPipeline.PipelineMaker addResolvedSeekableAnimatedImage(SeekableAnimatedVectorDrawable seekableDrawable, DynamicProto.DynamicFloat boundProgress, java.lang.String posId)

This store method shall be called during the layout inflation in a background thread.

public ProtoLayoutDynamicDataPipeline.PipelineMaker storeAnimatedVisibilityFor(java.lang.String posId, ModifiersProto.AnimatedVisibility animatedVisibility)

Stores the ModifiersProto.AnimatedVisibility associated with the posId.

public ProtoLayoutDynamicDataPipeline.PipelineMaker markNodeAsChanged(java.lang.String posId, boolean includePreviousChildren)

Mark the node posId as changed. Content transition animations affected by this node will be triggered when the pipeline is committed.

Parameters:

posId: positionId of the node
includePreviousChildren: if True, the previous children of this node will be marked as changed too. This is used for triggering Exit animations.

public ProtoLayoutDynamicDataPipeline.PipelineMaker markForChildRemoval(java.lang.String nodePosId)

Add the given source to the pipeline for future evaluation. Evaluation will start when ProtoLayoutDynamicDataPipeline.PipelineMaker is committed with ProtoLayoutDynamicDataPipeline.PipelineMaker.commit(ViewGroup, boolean).

public ProtoLayoutDynamicDataPipeline.PipelineMaker rememberNode(java.lang.String nodePosId)

Stores a node if doesn't exist. Otherwise does nothing.