Class WidgetFrame
- java.lang.Object
-
- androidx.constraintlayout.core.state.WidgetFrame
-
public class WidgetFrame extends java.lang.ObjectUtility class to encapsulate layout of a widget
-
-
Field Summary
Fields Modifier and Type Field Description floatalphaintbottomfloatinterpolatedPosintleftjava.lang.Stringnamestatic floatphone_orientationfloatpivotXfloatpivotYintrightfloatrotationXfloatrotationYfloatrotationZfloatscaleXfloatscaleYinttopfloattranslationXfloattranslationYfloattranslationZintvisibilityConstraintWidgetwidget
-
Constructor Summary
Constructors Constructor Description WidgetFrame()WidgetFrame(WidgetFrame frame)WidgetFrame(ConstraintWidget widget)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCustomColor(java.lang.String name, int color)voidaddCustomFloat(java.lang.String name, float value)floatcenterX()floatcenterY()CustomVariablegetCustomAttribute(java.lang.String name)Get the custom attribute given Namjava.util.Set<java.lang.String>getCustomAttributeNames()Get the known custom Attributes namesintgetCustomColor(java.lang.String name)floatgetCustomFloat(java.lang.String name)java.lang.StringgetId()TypedBundlegetMotionProperties()get the property bundle associated with MotionAttributesintheight()static voidinterpolate(int parentWidth, int parentHeight, WidgetFrame frame, WidgetFrame start, WidgetFrame end, Transition transition, float progress)booleanisDefaultTransform()java.lang.StringBuilderserialize(java.lang.StringBuilder ret)java.lang.StringBuilderserialize(java.lang.StringBuilder ret, boolean sendPhoneOrientation)If true also send the phone orientationvoidsetCustomAttribute(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)voidsetCustomValue(CustomAttribute valueAt, float[] mTempValues)booleansetValue(java.lang.String key, CLElement value)WidgetFrameupdate()WidgetFrameupdate(ConstraintWidget widget)voidupdateAttributes(WidgetFrame frame)intwidth()
-
-
-
Field Detail
-
widget
public ConstraintWidget widget
-
left
public int left
-
top
public int top
-
right
public int right
-
bottom
public int bottom
-
pivotX
public float pivotX
-
pivotY
public float pivotY
-
rotationX
public float rotationX
-
rotationY
public float rotationY
-
rotationZ
public float rotationZ
-
translationX
public float translationX
-
translationY
public float translationY
-
translationZ
public float translationZ
-
phone_orientation
public static float phone_orientation
-
scaleX
public float scaleX
-
scaleY
public float scaleY
-
alpha
public float alpha
-
interpolatedPos
public float interpolatedPos
-
visibility
public int visibility
-
name
public java.lang.String name
-
-
Constructor Detail
-
WidgetFrame
public WidgetFrame()
-
WidgetFrame
public WidgetFrame(ConstraintWidget widget)
-
WidgetFrame
public WidgetFrame(WidgetFrame frame)
-
-
Method Detail
-
width
public int width()
-
height
public int height()
-
updateAttributes
public void updateAttributes(WidgetFrame frame)
-
isDefaultTransform
public boolean isDefaultTransform()
-
interpolate
public static void interpolate(int parentWidth, int parentHeight, WidgetFrame frame, WidgetFrame start, WidgetFrame end, Transition transition, float progress)
-
centerX
public float centerX()
-
centerY
public float centerY()
-
update
public WidgetFrame update()
-
update
public WidgetFrame update(ConstraintWidget widget)
-
addCustomColor
public void addCustomColor(java.lang.String name, int color)
-
getCustomColor
public int getCustomColor(java.lang.String name)
-
addCustomFloat
public void addCustomFloat(java.lang.String name, float value)
-
getCustomFloat
public float getCustomFloat(java.lang.String name)
-
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)
Get the custom attribute given Nam- Parameters:
name- Name of the custom attribut- Returns:
- The customAttribute
-
getCustomAttributeNames
public java.util.Set<java.lang.String> getCustomAttributeNames()
Get the known custom Attributes names- Returns:
- set of custom attribute names
-
setValue
public boolean setValue(java.lang.String key, CLElement value) throws CLParsingException- Throws:
CLParsingException
-
getId
public java.lang.String getId()
-
serialize
public java.lang.StringBuilder serialize(java.lang.StringBuilder ret)
-
serialize
public java.lang.StringBuilder serialize(java.lang.StringBuilder ret, boolean sendPhoneOrientation)If true also send the phone orientation
-
setCustomValue
public void setCustomValue(CustomAttribute valueAt, float[] mTempValues)
-
getMotionProperties
public TypedBundle getMotionProperties()
get the property bundle associated with MotionAttributes- Returns:
- the property bundle associated with MotionAttributes or null
-
-