Class MotionKeyAttributes
- java.lang.Object
-
- androidx.constraintlayout.core.motion.key.MotionKey
-
- androidx.constraintlayout.core.motion.key.MotionKeyAttributes
-
- All Implemented Interfaces:
TypedValues
public class MotionKeyAttributes extends MotionKey
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface androidx.constraintlayout.core.motion.utils.TypedValues
TypedValues.AttributesType, TypedValues.Custom, TypedValues.CycleType, TypedValues.MotionScene, TypedValues.MotionType, TypedValues.OnSwipe, TypedValues.PositionType, TypedValues.TransitionType, TypedValues.TriggerType
-
-
Field Summary
Fields Modifier and Type Field Description static intKEY_TYPE-
Fields inherited from class androidx.constraintlayout.core.motion.key.MotionKey
ALPHA, CUSTOM, ELEVATION, mCustom, mFramePosition, mType, ROTATION, ROTATION_X, SCALE_X, SCALE_Y, TRANSITION_PATH_ROTATE, TRANSLATION_X, TRANSLATION_Y, UNSET, VISIBILITY
-
Fields inherited from interface androidx.constraintlayout.core.motion.utils.TypedValues
BOOLEAN_MASK, FLOAT_MASK, INT_MASK, S_CUSTOM, STRING_MASK, TYPE_FRAME_POSITION, TYPE_TARGET
-
-
Constructor Summary
Constructors Constructor Description MotionKeyAttributes()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddValues(java.util.HashMap<java.lang.String,SplineSet> splines)Defines method to add a a view to splines derived form this key frame.MotionKeyclone()voidgetAttributeNames(java.util.HashSet<java.lang.String> attributes)intgetCurveFit()intgetId(java.lang.String name)voidprintAttributes()voidsetInterpolation(java.util.HashMap<java.lang.String,java.lang.Integer> interpolation)Key frame can specify the type of interpolation it wants on various attributes For each string it set it to -1, CurveFit.LINEAR or CurveFit.SPLINEbooleansetValue(int type, float value)Used to set float valuesbooleansetValue(int type, int value)Used to set integer valuesbooleansetValue(int type, java.lang.String value)Used to set String values-
Methods inherited from class androidx.constraintlayout.core.motion.key.MotionKey
copy, getFramePosition, setCustomAttribute, setCustomAttribute, setCustomAttribute, setCustomAttribute, setFramePosition, setValue, setViewId
-
-
-
-
Field Detail
-
KEY_TYPE
public static final int KEY_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAttributeNames
public void getAttributeNames(java.util.HashSet<java.lang.String> attributes)
- Specified by:
getAttributeNamesin classMotionKey
-
addValues
public void addValues(java.util.HashMap<java.lang.String,SplineSet> splines)
Description copied from class:MotionKeyDefines method to add a a view to splines derived form this key frame. The values are written to the spline
-
setValue
public boolean setValue(int type, int value)Description copied from interface:TypedValuesUsed to set integer values- Specified by:
setValuein interfaceTypedValues- Overrides:
setValuein classMotionKey- Returns:
- true if it accepted the value
-
setValue
public boolean setValue(int type, float value)Description copied from interface:TypedValuesUsed to set float values- Specified by:
setValuein interfaceTypedValues- Overrides:
setValuein classMotionKey- Returns:
- true if it accepted the value
-
setInterpolation
public void setInterpolation(java.util.HashMap<java.lang.String,java.lang.Integer> interpolation)
Description copied from class:MotionKeyKey frame can specify the type of interpolation it wants on various attributes For each string it set it to -1, CurveFit.LINEAR or CurveFit.SPLINE- Overrides:
setInterpolationin classMotionKey
-
setValue
public boolean setValue(int type, java.lang.String value)Description copied from interface:TypedValuesUsed to set String values- Specified by:
setValuein interfaceTypedValues- Overrides:
setValuein classMotionKey- Returns:
- true if it accepted the value
-
getId
public int getId(java.lang.String name)
-
getCurveFit
public int getCurveFit()
-
printAttributes
public void printAttributes()
-
-