Class MotionKeyCycle
- java.lang.Object
-
- androidx.constraintlayout.core.motion.key.MotionKey
-
- androidx.constraintlayout.core.motion.key.MotionKeyCycle
-
- All Implemented Interfaces:
TypedValues
public class MotionKeyCycle 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_TYPEstatic intSHAPE_BOUNCEstatic intSHAPE_COS_WAVEstatic intSHAPE_REVERSE_SAW_WAVEstatic intSHAPE_SAW_WAVEstatic intSHAPE_SIN_WAVEstatic intSHAPE_SQUARE_WAVEstatic intSHAPE_TRIANGLE_WAVEstatic java.lang.StringWAVE_OFFSETstatic java.lang.StringWAVE_PERIODstatic java.lang.StringWAVE_PHASEstatic java.lang.StringWAVE_SHAPE-
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 MotionKeyCycle()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCycleValues(java.util.HashMap<java.lang.String,KeyCycleOscillator> oscSet)voidaddValues(java.util.HashMap<java.lang.String,SplineSet> splines)Defines method to add a a view to splines derived form this key frame.MotionKeyclone()voiddump()voidgetAttributeNames(java.util.HashSet<java.lang.String> attributes)intgetId(java.lang.String name)floatgetValue(java.lang.String key)voidprintAttributes()booleansetValue(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, setInterpolation, setValue, setViewId
-
-
-
-
Field Detail
-
WAVE_PERIOD
public static final java.lang.String WAVE_PERIOD
- See Also:
- Constant Field Values
-
WAVE_OFFSET
public static final java.lang.String WAVE_OFFSET
- See Also:
- Constant Field Values
-
WAVE_PHASE
public static final java.lang.String WAVE_PHASE
- See Also:
- Constant Field Values
-
WAVE_SHAPE
public static final java.lang.String WAVE_SHAPE
- See Also:
- Constant Field Values
-
SHAPE_SIN_WAVE
public static final int SHAPE_SIN_WAVE
- See Also:
- Constant Field Values
-
SHAPE_SQUARE_WAVE
public static final int SHAPE_SQUARE_WAVE
- See Also:
- Constant Field Values
-
SHAPE_TRIANGLE_WAVE
public static final int SHAPE_TRIANGLE_WAVE
- See Also:
- Constant Field Values
-
SHAPE_SAW_WAVE
public static final int SHAPE_SAW_WAVE
- See Also:
- Constant Field Values
-
SHAPE_REVERSE_SAW_WAVE
public static final int SHAPE_REVERSE_SAW_WAVE
- See Also:
- Constant Field Values
-
SHAPE_COS_WAVE
public static final int SHAPE_COS_WAVE
- See Also:
- Constant Field Values
-
SHAPE_BOUNCE
public static final int SHAPE_BOUNCE
- See Also:
- Constant Field Values
-
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, 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
-
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
-
getValue
public float getValue(java.lang.String key)
-
getId
public int getId(java.lang.String name)
-
addCycleValues
public void addCycleValues(java.util.HashMap<java.lang.String,KeyCycleOscillator> oscSet)
-
dump
public void dump()
-
printAttributes
public void printAttributes()
-
-