Class MotionKeyPosition
- java.lang.Object
-
- androidx.constraintlayout.core.motion.key.MotionKey
-
- androidx.constraintlayout.core.motion.key.MotionKeyPosition
-
- All Implemented Interfaces:
TypedValues
public class MotionKeyPosition 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 floatmAltPercentXfloatmAltPercentYintmCurveFitintmDrawPathintmPathMotionArcfloatmPercentHeightfloatmPercentWidthfloatmPercentXfloatmPercentYintmPositionTypejava.lang.StringmTransitionEasingprotected static floatSELECTION_SLOPEstatic intTYPE_CARTESIANstatic intTYPE_PATHstatic intTYPE_SCREEN-
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 MotionKeyPosition()
-
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()MotionKeycopy(MotionKey src)voidgetAttributeNames(java.util.HashSet<java.lang.String> attributes)intgetId(java.lang.String name)booleanintersects(int layoutWidth, int layoutHeight, FloatRect start, FloatRect end, float x, float y)voidpositionAttributes(MotionWidget view, FloatRect start, FloatRect end, float x, float y, java.lang.String[] attribute, float[] value)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
getFramePosition, setCustomAttribute, setCustomAttribute, setCustomAttribute, setCustomAttribute, setFramePosition, setInterpolation, setValue, setViewId
-
-
-
-
Field Detail
-
SELECTION_SLOPE
protected static final float SELECTION_SLOPE
- See Also:
- Constant Field Values
-
mCurveFit
public int mCurveFit
-
mTransitionEasing
public java.lang.String mTransitionEasing
-
mPathMotionArc
public int mPathMotionArc
-
mDrawPath
public int mDrawPath
-
mPercentWidth
public float mPercentWidth
-
mPercentHeight
public float mPercentHeight
-
mPercentX
public float mPercentX
-
mPercentY
public float mPercentY
-
mAltPercentX
public float mAltPercentX
-
mAltPercentY
public float mAltPercentY
-
TYPE_SCREEN
public static final int TYPE_SCREEN
- See Also:
- Constant Field Values
-
TYPE_PATH
public static final int TYPE_PATH
- See Also:
- Constant Field Values
-
TYPE_CARTESIAN
public static final int TYPE_CARTESIAN
- See Also:
- Constant Field Values
-
mPositionType
public int mPositionType
-
-
Method Detail
-
positionAttributes
public void positionAttributes(MotionWidget view, FloatRect start, FloatRect end, float x, float y, java.lang.String[] attribute, float[] value)
-
intersects
public boolean intersects(int layoutWidth, int layoutHeight, FloatRect start, FloatRect end, float x, float y)
-
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
-
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)
-
-