Class MotionWidget
- java.lang.Object
-
- androidx.constraintlayout.core.motion.MotionWidget
-
- All Implemented Interfaces:
TypedValues
public class MotionWidget extends java.lang.Object implements TypedValues
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMotionWidget.Motionstatic classMotionWidget.PropertySet-
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 intFILL_PARENTstatic intGONE_UNSETstatic intINVISIBLEstatic intMATCH_CONSTRAINTstatic intMATCH_CONSTRAINT_WRAPstatic intMATCH_PARENTstatic intPARENT_IDstatic intROTATE_LEFT_OF_PORTRATEstatic intROTATE_NONEstatic intROTATE_PORTRATE_OF_LEFTstatic intROTATE_PORTRATE_OF_RIGHTstatic intROTATE_RIGHT_OF_PORTRATEstatic intUNSETstatic intVISIBILITY_MODE_IGNOREstatic intVISIBILITY_MODE_NORMALstatic intVISIBLEstatic intWRAP_CONTENT-
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 MotionWidget()MotionWidget(WidgetFrame f)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MotionWidgetfindViewById(int mTransformPivotTarget)floatgetAlpha()intgetBottom()CustomVariablegetCustomAttribute(java.lang.String name)java.util.Set<java.lang.String>getCustomAttributeNames()intgetHeight()intgetId(java.lang.String name)intgetLeft()java.lang.StringgetName()MotionWidgetgetParent()floatgetPivotX()floatgetPivotY()intgetRight()floatgetRotationX()floatgetRotationY()floatgetRotationZ()floatgetScaleX()floatgetScaleY()intgetTop()floatgetTranslationX()floatgetTranslationY()floatgetTranslationZ()floatgetValueAttributes(int id)Sets the attributesintgetVisibility()WidgetFramegetWidgetFrame()intgetWidth()intgetX()intgetY()voidlayout(int l, int t, int r, int b)voidsetBounds(int left, int top, int right, int bottom)voidsetCustomAttribute(java.lang.String name, int type, boolean value)voidsetCustomAttribute(java.lang.String name, int type, float value)voidsetCustomAttribute(java.lang.String name, int type, int value)voidsetCustomAttribute(java.lang.String name, int type, java.lang.String value)voidsetInterpolatedValue(CustomAttribute attribute, float[] mCache)voidsetPivotX(float px)voidsetPivotY(float py)voidsetRotationX(float rotationX)voidsetRotationY(float rotationY)voidsetRotationZ(float rotationZ)voidsetScaleX(float scaleX)voidsetScaleY(float scaleY)voidsetTranslationX(float translationX)voidsetTranslationY(float translationY)voidsetTranslationZ(float tz)booleansetValue(int id, boolean value)Used to set boolean valuesbooleansetValue(int id, float value)Used to set float valuesbooleansetValue(int id, int value)Used to set integer valuesbooleansetValue(int id, java.lang.String value)Used to set String valuesbooleansetValueAttributes(int id, float value)Sets the attributesbooleansetValueMotion(int id, float value)booleansetValueMotion(int id, int value)booleansetValueMotion(int id, java.lang.String value)voidsetVisibility(int visibility)java.lang.StringtoString()voidupdateMotion(TypedValues toUpdate)This populates the motion attributes from widgetFrame to the MotionWidget
-
-
-
Field Detail
-
VISIBILITY_MODE_NORMAL
public static final int VISIBILITY_MODE_NORMAL
- See Also:
- Constant Field Values
-
VISIBILITY_MODE_IGNORE
public static final int VISIBILITY_MODE_IGNORE
- See Also:
- Constant Field Values
-
INVISIBLE
public static final int INVISIBLE
- See Also:
- Constant Field Values
-
VISIBLE
public static final int VISIBLE
- See Also:
- Constant Field Values
-
ROTATE_NONE
public static final int ROTATE_NONE
- See Also:
- Constant Field Values
-
ROTATE_PORTRATE_OF_RIGHT
public static final int ROTATE_PORTRATE_OF_RIGHT
- See Also:
- Constant Field Values
-
ROTATE_PORTRATE_OF_LEFT
public static final int ROTATE_PORTRATE_OF_LEFT
- See Also:
- Constant Field Values
-
ROTATE_RIGHT_OF_PORTRATE
public static final int ROTATE_RIGHT_OF_PORTRATE
- See Also:
- Constant Field Values
-
ROTATE_LEFT_OF_PORTRATE
public static final int ROTATE_LEFT_OF_PORTRATE
- See Also:
- Constant Field Values
-
UNSET
public static final int UNSET
- See Also:
- Constant Field Values
-
MATCH_CONSTRAINT
public static final int MATCH_CONSTRAINT
- See Also:
- Constant Field Values
-
PARENT_ID
public static final int PARENT_ID
- See Also:
- Constant Field Values
-
FILL_PARENT
public static final int FILL_PARENT
- See Also:
- Constant Field Values
-
MATCH_PARENT
public static final int MATCH_PARENT
- See Also:
- Constant Field Values
-
WRAP_CONTENT
public static final int WRAP_CONTENT
- See Also:
- Constant Field Values
-
GONE_UNSET
public static final int GONE_UNSET
- See Also:
- Constant Field Values
-
MATCH_CONSTRAINT_WRAP
public static final int MATCH_CONSTRAINT_WRAP
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MotionWidget
public MotionWidget()
-
MotionWidget
public MotionWidget(WidgetFrame f)
-
-
Method Detail
-
getParent
public MotionWidget getParent()
-
findViewById
public MotionWidget findViewById(int mTransformPivotTarget)
-
setVisibility
public void setVisibility(int visibility)
-
getName
public java.lang.String getName()
-
layout
public void layout(int l, int t, int r, int b)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
setBounds
public void setBounds(int left, int top, int right, int bottom)
-
updateMotion
public void updateMotion(TypedValues toUpdate)
This populates the motion attributes from widgetFrame to the MotionWidget
-
setValue
public boolean setValue(int id, int value)Description copied from interface:TypedValuesUsed to set integer values- Specified by:
setValuein interfaceTypedValues- Returns:
- true if it accepted the value
-
setValue
public boolean setValue(int id, float value)Description copied from interface:TypedValuesUsed to set float values- Specified by:
setValuein interfaceTypedValues- Returns:
- true if it accepted the value
-
setValue
public boolean setValue(int id, java.lang.String value)Description copied from interface:TypedValuesUsed to set String values- Specified by:
setValuein interfaceTypedValues- Returns:
- true if it accepted the value
-
setValue
public boolean setValue(int id, boolean value)Description copied from interface:TypedValuesUsed to set boolean values- Specified by:
setValuein interfaceTypedValues- Returns:
- true if it accepted the value
-
setValueMotion
public boolean setValueMotion(int id, int value)
-
setValueMotion
public boolean setValueMotion(int id, java.lang.String value)
-
setValueMotion
public boolean setValueMotion(int id, float value)
-
setValueAttributes
public boolean setValueAttributes(int id, float value)Sets the attributes
-
getValueAttributes
public float getValueAttributes(int id)
Sets the attributes
-
getId
public int getId(java.lang.String name)
- Specified by:
getIdin interfaceTypedValues
-
getTop
public int getTop()
-
getLeft
public int getLeft()
-
getBottom
public int getBottom()
-
getRight
public int getRight()
-
setPivotX
public void setPivotX(float px)
-
setPivotY
public void setPivotY(float py)
-
getRotationX
public float getRotationX()
-
setRotationX
public void setRotationX(float rotationX)
-
getRotationY
public float getRotationY()
-
setRotationY
public void setRotationY(float rotationY)
-
getRotationZ
public float getRotationZ()
-
setRotationZ
public void setRotationZ(float rotationZ)
-
getTranslationX
public float getTranslationX()
-
setTranslationX
public void setTranslationX(float translationX)
-
getTranslationY
public float getTranslationY()
-
setTranslationY
public void setTranslationY(float translationY)
-
setTranslationZ
public void setTranslationZ(float tz)
-
getTranslationZ
public float getTranslationZ()
-
getScaleX
public float getScaleX()
-
setScaleX
public void setScaleX(float scaleX)
-
getScaleY
public float getScaleY()
-
setScaleY
public void setScaleY(float scaleY)
-
getVisibility
public int getVisibility()
-
getPivotX
public float getPivotX()
-
getPivotY
public float getPivotY()
-
getAlpha
public float getAlpha()
-
getX
public int getX()
-
getY
public int getY()
-
getWidth
public int getWidth()
-
getHeight
public int getHeight()
-
getWidgetFrame
public WidgetFrame getWidgetFrame()
-
getCustomAttributeNames
public java.util.Set<java.lang.String> getCustomAttributeNames()
-
setCustomAttribute
public void setCustomAttribute(java.lang.String name, int type, float value)
-
setCustomAttribute
public void setCustomAttribute(java.lang.String name, int type, int value)
-
setCustomAttribute
public void setCustomAttribute(java.lang.String name, int type, boolean value)
-
setCustomAttribute
public void setCustomAttribute(java.lang.String name, int type, java.lang.String value)
-
getCustomAttribute
public CustomVariable getCustomAttribute(java.lang.String name)
-
setInterpolatedValue
public void setInterpolatedValue(CustomAttribute attribute, float[] mCache)
-
-