public interface

DynamicBuilders.DynamicColor

implements DynamicBuilders.DynamicType

 androidx.wear.protolayout.expression.DynamicBuilders.DynamicColor

Overview

Interface defining a dynamic color type.

Summary

Methods
public DynamicBuilders.DynamicColoranimate()

Returns a DynamicBuilders.DynamicColor that is bound to the value of this DynamicBuilders.DynamicColor and every time its value is changing, it animates from its current value to the new value.

public DynamicBuilders.DynamicColoranimate(AnimationParameterBuilders.AnimationSpec animationSpec)

Returns a DynamicBuilders.DynamicColor that is bound to the value of this DynamicBuilders.DynamicColor and every time its value is changing, it animates from its current value to the new value.

public static DynamicBuilders.DynamicColoranimate(DynamicDataKey<DynamicBuilders.DynamicColor> dynamicDataKey)

Creates a DynamicBuilders.DynamicColor that is bound to the value of an item of the State.

public static DynamicBuilders.DynamicColoranimate(DynamicDataKey<DynamicBuilders.DynamicColor> dynamicDataKey, AnimationParameterBuilders.AnimationSpec animationSpec)

Creates a DynamicBuilders.DynamicColor that is bound to the value of an item of the State.

public static DynamicBuilders.DynamicColoranimate(int start, int end)

Creates a DynamicBuilders.DynamicColor which will animate over the range of colors from start to end.

public static DynamicBuilders.DynamicColoranimate(int start, int end, AnimationParameterBuilders.AnimationSpec animationSpec)

Creates a DynamicBuilders.DynamicColor which will animate over the range of colors from start to end with the given animation parameters.

public static DynamicBuilders.DynamicColorconstant(int constant)

Creates a constant-valued DynamicBuilders.DynamicColor.

public static DynamicBuilders.DynamicColorfrom(DynamicDataKey<DynamicBuilders.DynamicColor> dynamicDataKey)

Creates a DynamicBuilders.DynamicColor that is bound to the value of an item of the State.

public static DynamicBuilders.DynamicColorfromByteArray(byte[] byteArray[])

Creates a DynamicBuilders.DynamicColor from a byte array generated by DynamicBuilders.DynamicColor.toDynamicColorByteArray().

public static DynamicBuilders.DynamicColorfromByteArray(byte[] byteArray[], int offset, int length)

Creates a DynamicBuilders.DynamicColor from the provided byte array at the provided offset and length, that was generated by one of the DynamicBuilders.DynamicColor.toDynamicColorByteArray() overloads.

public FingerprintgetFingerprint()

Get the fingerprint for this object or null if unknown.

public static ConditionScopes.ConditionScope<DynamicBuilders.DynamicColor, java.lang.Integer>onCondition(DynamicBuilders.DynamicBool condition)

Bind the value of this DynamicBuilders.DynamicColor to the result of a conditional expression.

public byte[]toDynamicColorByteArray()

Serializes the DynamicBuilders.DynamicColor into a new byte array that can later be used with DynamicBuilders.DynamicColor.fromByteArray(byte[]).

public inttoDynamicColorByteArray(byte[] byteArray[])

Serializes the DynamicBuilders.DynamicColor into the provided byte array, returning the amount of bytes written, that can later be used with DynamicColor.fromByteArray(byteArray, 0, bytesWritten).

public inttoDynamicColorByteArray(byte[] byteArray[], int offset, int length)

Serializes the DynamicBuilders.DynamicColor into the provided byte array, returning the amount of bytes written, limited by the provided offset and length, that can later be used with DynamicColor.fromByteArray(byteArray, offset, bytesWritten).

public DynamicProto.DynamicColortoDynamicColorProto()

Get the protocol buffer representation of this object, without fingerprint.

public DynamicProto.DynamicColortoDynamicColorProto(boolean withFingerprint)

Get the protocol buffer representation of this object, with or without fingerprint.

Methods

public DynamicProto.DynamicColor toDynamicColorProto()

Get the protocol buffer representation of this object, without fingerprint.

public DynamicProto.DynamicColor toDynamicColorProto(boolean withFingerprint)

Get the protocol buffer representation of this object, with or without fingerprint.

public static DynamicBuilders.DynamicColor fromByteArray(byte[] byteArray[])

Creates a DynamicBuilders.DynamicColor from a byte array generated by DynamicBuilders.DynamicColor.toDynamicColorByteArray().

public static DynamicBuilders.DynamicColor fromByteArray(byte[] byteArray[], int offset, int length)

Creates a DynamicBuilders.DynamicColor from the provided byte array at the provided offset and length, that was generated by one of the DynamicBuilders.DynamicColor.toDynamicColorByteArray() overloads.

public byte[] toDynamicColorByteArray()

Serializes the DynamicBuilders.DynamicColor into a new byte array that can later be used with DynamicBuilders.DynamicColor.fromByteArray(byte[]).

public int toDynamicColorByteArray(byte[] byteArray[])

Serializes the DynamicBuilders.DynamicColor into the provided byte array, returning the amount of bytes written, that can later be used with DynamicColor.fromByteArray(byteArray, 0, bytesWritten).

public int toDynamicColorByteArray(byte[] byteArray[], int offset, int length)

Serializes the DynamicBuilders.DynamicColor into the provided byte array, returning the amount of bytes written, limited by the provided offset and length, that can later be used with DynamicColor.fromByteArray(byteArray, offset, bytesWritten).

public static DynamicBuilders.DynamicColor constant(int constant)

Creates a constant-valued DynamicBuilders.DynamicColor.

public static DynamicBuilders.DynamicColor from(DynamicDataKey<DynamicBuilders.DynamicColor> dynamicDataKey)

Creates a DynamicBuilders.DynamicColor that is bound to the value of an item of the State.

Parameters:

dynamicDataKey: The source key to a DynamicDataBuilders.DynamicDataValue with a color value.

public static DynamicBuilders.DynamicColor animate(int start, int end)

Creates a DynamicBuilders.DynamicColor which will animate over the range of colors from start to end.

Parameters:

start: The start value of the range.
end: The end value of the range.

public static DynamicBuilders.DynamicColor animate(int start, int end, AnimationParameterBuilders.AnimationSpec animationSpec)

Creates a DynamicBuilders.DynamicColor which will animate over the range of colors from start to end with the given animation parameters.

Parameters:

start: The start value of the range.
end: The end value of the range.
animationSpec: The animation parameters.

public static DynamicBuilders.DynamicColor animate(DynamicDataKey<DynamicBuilders.DynamicColor> dynamicDataKey)

Creates a DynamicBuilders.DynamicColor that is bound to the value of an item of the State. Every time the state value changes, this DynamicBuilders.DynamicColor will animate from its current value to the new value (from the state).

Parameters:

dynamicDataKey: The source key to a DynamicDataBuilders.DynamicDataValue with a color value.

public static DynamicBuilders.DynamicColor animate(DynamicDataKey<DynamicBuilders.DynamicColor> dynamicDataKey, AnimationParameterBuilders.AnimationSpec animationSpec)

Creates a DynamicBuilders.DynamicColor that is bound to the value of an item of the State. Every time the state value changes, this DynamicBuilders.DynamicColor will animate from its current value to the new value (from the state).

Parameters:

dynamicDataKey: The source key to a DynamicDataBuilders.DynamicDataValue with a color value.
animationSpec: The animation parameters.

Returns a DynamicBuilders.DynamicColor that is bound to the value of this DynamicBuilders.DynamicColor and every time its value is changing, it animates from its current value to the new value.

Parameters:

animationSpec: The animation parameters.

Returns a DynamicBuilders.DynamicColor that is bound to the value of this DynamicBuilders.DynamicColor and every time its value is changing, it animates from its current value to the new value.

public static ConditionScopes.ConditionScope<DynamicBuilders.DynamicColor, java.lang.Integer> onCondition(DynamicBuilders.DynamicBool condition)

Bind the value of this DynamicBuilders.DynamicColor to the result of a conditional expression. This will use the value given in either ConditionScopes.ConditionScope.use(T) or ConditionScopes.IfTrueScope.elseUse(T) depending on the value yielded from condition.

public Fingerprint getFingerprint()

Get the fingerprint for this object or null if unknown.