Class CustomAttribute
- java.lang.Object
-
- androidx.constraintlayout.core.motion.CustomAttribute
-
public class CustomAttribute extends java.lang.ObjectDefines non standard Attributes
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCustomAttribute.AttributeType
-
Constructor Summary
Constructors Constructor Description CustomAttribute(CustomAttribute source, java.lang.Object value)CustomAttribute(java.lang.String name, CustomAttribute.AttributeType attributeType)CustomAttribute(java.lang.String name, CustomAttribute.AttributeType attributeType, java.lang.Object value, boolean method)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandiff(CustomAttribute customAttribute)test if the two attributes are differentCustomAttribute.AttributeTypegetType()voidgetValuesToInterpolate(float[] ret)floatgetValueToInterpolate()Transforms value to a float for the purpose of interpolationstatic inthsvToRgb(float hue, float saturation, float value)booleanisContinuous()Continuous types are interpolated they are fired only atintnumberOfInterpolatedValues()The number of interpolation values that need to be interpolated Typically 1 but 3 for colors.voidsetColorValue(int value)voidsetFloatValue(float value)voidsetIntValue(int value)voidsetStringValue(java.lang.String value)voidsetValue(float[] value)voidsetValue(java.lang.Object value)
-
-
-
Constructor Detail
-
CustomAttribute
public CustomAttribute(java.lang.String name, CustomAttribute.AttributeType attributeType)
-
CustomAttribute
public CustomAttribute(java.lang.String name, CustomAttribute.AttributeType attributeType, java.lang.Object value, boolean method)
-
CustomAttribute
public CustomAttribute(CustomAttribute source, java.lang.Object value)
-
-
Method Detail
-
getType
public CustomAttribute.AttributeType getType()
-
isContinuous
public boolean isContinuous()
Continuous types are interpolated they are fired only at
-
setFloatValue
public void setFloatValue(float value)
-
setColorValue
public void setColorValue(int value)
-
setIntValue
public void setIntValue(int value)
-
setStringValue
public void setStringValue(java.lang.String value)
-
numberOfInterpolatedValues
public int numberOfInterpolatedValues()
The number of interpolation values that need to be interpolated Typically 1 but 3 for colors.- Returns:
- Typically 1 but 3 for colors.
-
getValueToInterpolate
public float getValueToInterpolate()
Transforms value to a float for the purpose of interpolation- Returns:
- interpolation value
-
getValuesToInterpolate
public void getValuesToInterpolate(float[] ret)
-
setValue
public void setValue(float[] value)
-
hsvToRgb
public static int hsvToRgb(float hue, float saturation, float value)
-
diff
public boolean diff(CustomAttribute customAttribute)
test if the two attributes are different
-
setValue
public void setValue(java.lang.Object value)
-
-