# Motion

Artifact: [androidx.constraintlayout:constraintlayout-core](https://developer.android.com/jetpack/androidx/releases/constraintlayout) [View Source](https://cs.android.com/search?q=file:androidx/constraintlayout/core/motion/Motion.java+class:androidx.constraintlayout.core.motion.Motion) Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

*** ** * ** ***


```
public class Motion implements TypedValues
```

<br />

*** ** * ** ***

Contains the picture of a view through a transition and is used to interpolate it. During a transition every view has a MotionController which drives its position.

All parameter which affect a views motion are added to MotionController and then setup() builds out the splines that control the view.

## Summary

| ### Constants |
|---|---|
| `static final int` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#DRAW_PATH_AS_CONFIGURED() = 4` |
| `static final int` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#DRAW_PATH_BASIC() = 1` |
| `static final int` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#DRAW_PATH_CARTESIAN() = 3` |
| `static final int` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#DRAW_PATH_NONE() = 0` |
| `static final int` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#DRAW_PATH_RECTANGLE() = 5` |
| `static final int` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#DRAW_PATH_RELATIVE() = 2` |
| `static final int` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#DRAW_PATH_SCREEN() = 6` |
| `static final int` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#HORIZONTAL_PATH_X() = 2` |
| `static final int` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#HORIZONTAL_PATH_Y() = 3` |
| `static final int` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#PATH_PERCENT() = 0` |
| `static final int` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#PATH_PERPENDICULAR() = 1` |
| `static final int` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#ROTATION_LEFT() = 2` |
| `static final int` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#ROTATION_RIGHT() = 1` |
| `static final int` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#VERTICAL_PATH_X() = 4` |
| `static final int` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#VERTICAL_PATH_Y() = 5` |

| ### Public fields |
|---|---|
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#mId()` |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#Motion(androidx.constraintlayout.core.motion.MotionWidget)(https://developer.android.com/reference/androidx/constraintlayout/core/motion/MotionWidget view)` |

| ### Public methods |
|---|---|
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#addKey(androidx.constraintlayout.core.motion.key.MotionKey)(https://developer.android.com/reference/androidx/constraintlayout/core/motion/key/MotionKey key)` |
| `int` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#buildKeyFrames(float[],int[],int[])(float[] keyFrames, int[] mode, int[] pos)` |
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#buildPath(float[],int)(float[] points, int pointCount)` Fills the array point with the center coordinates. point\[0\] is filled with the x coordinate of "time" 0.0 mPoints\[point.length-1\] is filled with the y coordinate of "time" 1.0 |
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#buildRect(float,float[],int)(float p, float[] path, int offset)` |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#getAnimateRelativeTo()()` Returns the id of the view to move relative to. |
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#getCenter(double,float[],float[])(double p, float[] pos, float[] vel)` |
| `float` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#getCenterX()()` |
| `float` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#getCenterY()()` |
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#getDpDt(float,float,float,float[])( float position, float locationX, float locationY, float[] mAnchorDpDt )` This returns the differential with respect to the animation layout position (Progress) of a point on the view (post layout effects are not computed) |
| `int` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#getDrawPath()()` |
| `float` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#getFinalHeight()()` get the width of the widget at the end of the movement. |
| `float` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#getFinalWidth()()` get the width of the widget at the end of the movement. |
| `float` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#getFinalX()()` get the left most position of the widget at the end of the movement. |
| `float` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#getFinalY()()` get the top most position of the widget at the end of the movement. |
| `int` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#getId(java.lang.String)(https://developer.android.com/reference/java/lang/String.html name)` |
| `https://developer.android.com/reference/androidx/constraintlayout/core/motion/MotionPaths` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#getKeyFrame(int)(int i)` provides access to MotionPath objects |
| `int` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#getKeyFrameInfo(int,int[])(int type, int[] info)` Gets the keyFrames for the view controlled by this MotionController. |
| `int` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#getKeyFramePositions(int[],float[])(int[] type, float[] pos)` Get the keyFrames for the view controlled by this MotionController |
| `float` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#getMotionStagger()()` The values set in motion: { stagger: '2' } |
| `float` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#getStartHeight()()` get the width of the widget at the start of the movement. |
| `float` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#getStartWidth()()` get the width of the widget at the start of the movement. |
| `float` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#getStartX()()` get the left most position of the widget at the start of the movement. |
| `float` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#getStartY()()` get the top most position of the widget at the start of the movement. |
| `int` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#getTransformPivotTarget()()` Get the view to pivot around |
| `https://developer.android.com/reference/androidx/constraintlayout/core/motion/MotionWidget` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#getView()()` |
| `boolean` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#interpolate(androidx.constraintlayout.core.motion.MotionWidget,float,long,androidx.constraintlayout.core.motion.utils.KeyCache)( https://developer.android.com/reference/androidx/constraintlayout/core/motion/MotionWidget child, float globalPosition, long time, https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/KeyCache keyCache )` The main driver of interpolation |
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#setDrawPath(int)(int debugMode)` |
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#setEnd(androidx.constraintlayout.core.motion.MotionWidget)(https://developer.android.com/reference/androidx/constraintlayout/core/motion/MotionWidget mw)` |
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#setIdString(java.lang.String)(https://developer.android.com/reference/java/lang/String.html stringId)` |
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#setPathMotionArc(int)(int arc)` |
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#setStaggerOffset(float)(float staggerOffset)` set the offset used in calculating stagger launches |
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#setStaggerScale(float)(float staggerScale)` Set stagger scale |
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#setStart(androidx.constraintlayout.core.motion.MotionWidget)(https://developer.android.com/reference/androidx/constraintlayout/core/motion/MotionWidget mw)` |
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#setStartState(androidx.constraintlayout.core.motion.utils.ViewState,androidx.constraintlayout.core.motion.MotionWidget,int,int,int)( https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/ViewState rect, https://developer.android.com/reference/androidx/constraintlayout/core/motion/MotionWidget v, int rotation, int preWidth, int preHeight )` |
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#setTransformPivotTarget(int)(int transformPivotTarget)` Set a view to pivot around |
| `boolean` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#setValue(int,boolean)(int id, boolean value)` Used to set boolean values |
| `boolean` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#setValue(int,float)(int id, float value)` Used to set float values |
| `boolean` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#setValue(int,int)(int id, int value)` Used to set integer values |
| `boolean` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#setValue(int,java.lang.String)(int id, https://developer.android.com/reference/java/lang/String.html value)` Used to set String values |
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#setView(androidx.constraintlayout.core.motion.MotionWidget)(https://developer.android.com/reference/androidx/constraintlayout/core/motion/MotionWidget view)` |
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#setup(int,int,float,long)( int parentWidth, int parentHeight, float transitionDuration, long currentTime )` Called after all TimePoints \&Cycles have been added; Spines are evaluated |
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#setupRelative(androidx.constraintlayout.core.motion.Motion)(https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion motionController)` set up the motion to be relative to this other motionController |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/Motion#toString()()` Debug string |

| ### Inherited Constants |
|---|
| From [androidx.constraintlayout.core.motion.utils.TypedValues](https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TypedValues) |---|---| | `static final int` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TypedValues#BOOLEAN_MASK() = 1` | | `static final int` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TypedValues#FLOAT_MASK() = 4` | | `static final int` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TypedValues#INT_MASK() = 2` | | `static final int` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TypedValues#STRING_MASK() = 8` | | `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TypedValues#S_CUSTOM() = "CUSTOM"` | | `static final int` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TypedValues#TYPE_FRAME_POSITION() = 100` | | `static final int` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TypedValues#TYPE_TARGET() = 101` | |

## Constants

### DRAW_PATH_AS_CONFIGURED

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public static final int DRAW_PATH_AS_CONFIGURED = 4
```

### DRAW_PATH_BASIC

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public static final int DRAW_PATH_BASIC = 1
```

### DRAW_PATH_CARTESIAN

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public static final int DRAW_PATH_CARTESIAN = 3
```

### DRAW_PATH_NONE

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public static final int DRAW_PATH_NONE = 0
```

### DRAW_PATH_RECTANGLE

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public static final int DRAW_PATH_RECTANGLE = 5
```

### DRAW_PATH_RELATIVE

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public static final int DRAW_PATH_RELATIVE = 2
```

### DRAW_PATH_SCREEN

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public static final int DRAW_PATH_SCREEN = 6
```

### HORIZONTAL_PATH_X

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public static final int HORIZONTAL_PATH_X = 2
```

### HORIZONTAL_PATH_Y

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public static final int HORIZONTAL_PATH_Y = 3
```

### PATH_PERCENT

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public static final int PATH_PERCENT = 0
```

### PATH_PERPENDICULAR

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public static final int PATH_PERPENDICULAR = 1
```

### ROTATION_LEFT

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public static final int ROTATION_LEFT = 2
```

### ROTATION_RIGHT

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public static final int ROTATION_RIGHT = 1
```

### VERTICAL_PATH_X

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public static final int VERTICAL_PATH_X = 4
```

### VERTICAL_PATH_Y

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public static final int VERTICAL_PATH_Y = 5
```

## Public fields

### mId

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public String mId
```

## Public constructors

### Motion

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public Motion(MotionWidget view)
```

## Public methods

### addKey

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public void addKey(MotionKey key)
```

### buildKeyFrames

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public int buildKeyFrames(float[] keyFrames, int[] mode, int[] pos)
```

### buildPath

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public void buildPath(float[] points, int pointCount)
```

Fills the array point with the center coordinates. point\[0\] is filled with the x coordinate of "time" 0.0 mPoints\[point.length-1\] is filled with the y coordinate of "time" 1.0

| Parameters |
|---|---|
| `float[] points` | array to fill (should be 2x the number of mPoints |

### buildRect

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public void buildRect(float p, float[] path, int offset)
```

### getAnimateRelativeTo

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public String getAnimateRelativeTo()
```

Returns the id of the view to move relative to. The position at the start and then end will be viewed relative to this view -1 is the return value if NOT in polar mode

| Returns |
|---|---|
| `https://developer.android.com/reference/java/lang/String.html` | the view id of the view this is in polar mode to or -1 if not in polar |

### getCenter

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public void getCenter(double p, float[] pos, float[] vel)
```

### getCenterX

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public float getCenterX()
```

### getCenterY

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public float getCenterY()
```

### getDpDt

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public void getDpDt(
    float position,
    float locationX,
    float locationY,
    float[] mAnchorDpDt
)
```

This returns the differential with respect to the animation layout position (Progress) of a point on the view (post layout effects are not computed)

| Parameters |
|---|---|
| `float position` | position in time |
| `float locationX` | the x location on the view (0 = left edge, 1 = right edge) |
| `float locationY` | the y location on the view (0 = top, 1 = bottom) |
| `float[] mAnchorDpDt` | returns the differential of the motion with respect to the position |

### getDrawPath

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public int getDrawPath()
```

### getFinalHeight

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public float getFinalHeight()
```

get the width of the widget at the end of the movement.

| Returns |
|---|---|
| `float` | the height at the end |

### getFinalWidth

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public float getFinalWidth()
```

get the width of the widget at the end of the movement.

| Returns |
|---|---|
| `float` | the width at the end |

### getFinalX

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public float getFinalX()
```

get the left most position of the widget at the end of the movement.

| Returns |
|---|---|
| `float` | the left most position |

### getFinalY

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public float getFinalY()
```

get the top most position of the widget at the end of the movement. Positive is down.

| Returns |
|---|---|
| `float` | the top most position |

### getId

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public int getId(String name)
```

### getKeyFrame

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public MotionPaths getKeyFrame(int i)
```

provides access to MotionPath objects

### getKeyFrameInfo

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public int getKeyFrameInfo(int type, int[] info)
```

Gets the keyFrames for the view controlled by this MotionController. The info data structure is of the form 0 length if your are at index i the \[i+len+1\] is the next entry 1 type 1=Attributes, 2=Position, 3=TimeCycle 4=Cycle 5=Trigger 2 position 3 x location 4 y location 5 ... length

| Parameters |
|---|---|
| `int[] info` | is a data structure array of int that holds info on each keyframe |

| Returns |
|---|---|
| `int` | Number of keyFrames found |

### getKeyFramePositions

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public int getKeyFramePositions(int[] type, float[] pos)
```

Get the keyFrames for the view controlled by this MotionController

| Parameters |
|---|---|
| `int[] type` | is position(0-100) + 1000 \* mType(1=Attributes, 2=Position, 3=TimeCycle 4=Cycle 5=Trigger |
| `float[] pos` | the x\&y position of the keyFrame along the path |

| Returns |
|---|---|
| `int` | Number of keyFrames found |

### getMotionStagger

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public float getMotionStagger()
```

The values set in motion: { stagger: '2' }

| Returns |
|---|---|
| `float` | value from motion: { stagger: ? } or NaN if not set |

### getStartHeight

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public float getStartHeight()
```

get the width of the widget at the start of the movement.

| Returns |
|---|---|
| `float` | the height at the start |

### getStartWidth

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public float getStartWidth()
```

get the width of the widget at the start of the movement.

| Returns |
|---|---|
| `float` | the width at the start |

### getStartX

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public float getStartX()
```

get the left most position of the widget at the start of the movement.

| Returns |
|---|---|
| `float` | the left most position |

### getStartY

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public float getStartY()
```

get the top most position of the widget at the start of the movement. Positive is down.

| Returns |
|---|---|
| `float` | the top most position |

### getTransformPivotTarget

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public int getTransformPivotTarget()
```

Get the view to pivot around

| Returns |
|---|---|
| `int` | id of view or UNSET if not set |

### getView

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public MotionWidget getView()
```

### interpolate

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public boolean interpolate(
    MotionWidget child,
    float globalPosition,
    long time,
    KeyCache keyCache
)
```

The main driver of interpolation

| Returns |
|---|---|
| `boolean` | do you need to keep animating |

### setDrawPath

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public void setDrawPath(int debugMode)
```

### setEnd

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public void setEnd(MotionWidget mw)
```

### setIdString

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public void setIdString(String stringId)
```

### setPathMotionArc

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public void setPathMotionArc(int arc)
```

### setStaggerOffset

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public void setStaggerOffset(float staggerOffset)
```

set the offset used in calculating stagger launches

| Parameters |
|---|---|
| `float staggerOffset` | fraction of progress before this controller runs |

### setStaggerScale

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public void setStaggerScale(float staggerScale)
```

Set stagger scale

### setStart

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public void setStart(MotionWidget mw)
```

### setStartState

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public void setStartState(
    ViewState rect,
    MotionWidget v,
    int rotation,
    int preWidth,
    int preHeight
)
```

### setTransformPivotTarget

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public void setTransformPivotTarget(int transformPivotTarget)
```

Set a view to pivot around

| Parameters |
|---|---|
| `int transformPivotTarget` | id of view |

### setValue

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public boolean setValue(int id, boolean value)
```

Used to set boolean values

| Returns |
|---|---|
| `boolean` | true if it accepted the value |

### setValue

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public boolean setValue(int id, float value)
```

Used to set float values

| Returns |
|---|---|
| `boolean` | true if it accepted the value |

### setValue

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public boolean setValue(int id, int value)
```

Used to set integer values

| Returns |
|---|---|
| `boolean` | true if it accepted the value |

### setValue

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public boolean setValue(int id, String value)
```

Used to set String values

| Returns |
|---|---|
| `boolean` | true if it accepted the value |

### setView

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public void setView(MotionWidget view)
```

### setup

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public void setup(
    int parentWidth,
    int parentHeight,
    float transitionDuration,
    long currentTime
)
```

Called after all TimePoints \&Cycles have been added; Spines are evaluated

### setupRelative

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
public void setupRelative(Motion motionController)
```

set up the motion to be relative to this other motionController

### toString

```
public String toString()
```

Debug string