# MotionController

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

*** ** * ** ***

<br />

```
class MotionController
```

<br />

*** ** * ** ***

Contains the picture of a view through a transition and is used to interpolate it. During an 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 |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#DRAW_PATH_AS_CONFIGURED() = 4` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#DRAW_PATH_BASIC() = 1` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#DRAW_PATH_CARTESIAN() = 3` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#DRAW_PATH_NONE() = 0` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#DRAW_PATH_RECTANGLE() = 5` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#DRAW_PATH_RELATIVE() = 2` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#DRAW_PATH_SCREEN() = 6` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#HORIZONTAL_PATH_X() = 2` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#HORIZONTAL_PATH_Y() = 3` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#PATH_PERCENT() = 0` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#PATH_PERPENDICULAR() = 1` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#ROTATION_LEFT() = 2` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#ROTATION_RIGHT() = 1` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#VERTICAL_PATH_X() = 4` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#VERTICAL_PATH_Y() = 5` |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#addKey(androidx.constraintlayout.motion.widget.Key)(key: https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/Key!)` Add a key to the MotionController |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#getAnimateRelativeTo()()` Will return the id of the view to move relative to. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#getCenter(double,float[],float[])(p: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html, pos: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html>!, vel: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html>!)` Get a center and velocities at the position p |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#getCenterX()()` Get the center X of the motion at the current progress |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#getCenterY()()` Get the center Y of the motion at the current progress |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#getDrawPath()()` returns the draw path mode |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#getFinalHeight()()` get the width of the widget at the end of the movement. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#getFinalWidth()()` get the width of the widget at the end of the movement. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#getFinalX()()` get the left most position of the widget at the end of the movement. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#getFinalY()()` get the top most position of the widget at the end of the movement. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#getKeyFrameInfo(int,int[])(type: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, info: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>!)` Get 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 |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#getKeyFramePositions(int[],float[])(type: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>!, pos: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html>!)` Get the keyFrames for the view controlled by this MotionController |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#getStartHeight()()` get the width of the widget at the start of the movement. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#getStartWidth()()` get the width of the widget at the start of the movement. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#getStartX()()` get the left most position of the widget at the start of the movement. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#getStartY()()` get the top most position of the widget at the start of the movement. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#getTransformPivotTarget()()` Get the view to pivot around |
| `https://developer.android.com/reference/android/view/View.html!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#getView()()` Get the view that is being controlled |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#remeasure()()` During the next layout call measure then layout |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#setDrawPath(int)(debugMode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#setPathMotionArc(int)(arc: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#setStartState(androidx.constraintlayout.motion.utils.ViewState,android.view.View,int,int,int)( rect: https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/utils/ViewState!, v: https://developer.android.com/reference/android/view/View.html!, rotation: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, preWidth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, preHeight: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` configure the position of the view |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#setTransformPivotTarget(int)(transformPivotTarget: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Set a view to pivot around |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#setView(android.view.View)(view: https://developer.android.com/reference/android/view/View.html!)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#setup(int,int,float,long)( parentWidth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, parentHeight: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, transitionDuration: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, currentTime: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html )` Called after all TimePoints \&Cycles have been added; Spines are evaluated |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#setupRelative(androidx.constraintlayout.motion.widget.MotionController)(motionController: https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController!)` This ties one motionController to another to allow relative pathes |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController#toString()()` Debug string |

## Constants

### DRAW_PATH_AS_CONFIGURED

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

```
const val DRAW_PATH_AS_CONFIGURED = 4: Int
```

### DRAW_PATH_BASIC

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

```
const val DRAW_PATH_BASIC = 1: Int
```

### DRAW_PATH_CARTESIAN

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

```
const val DRAW_PATH_CARTESIAN = 3: Int
```

### DRAW_PATH_NONE

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

```
const val DRAW_PATH_NONE = 0: Int
```

### DRAW_PATH_RECTANGLE

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

```
const val DRAW_PATH_RECTANGLE = 5: Int
```

### DRAW_PATH_RELATIVE

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

```
const val DRAW_PATH_RELATIVE = 2: Int
```

### DRAW_PATH_SCREEN

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

```
const val DRAW_PATH_SCREEN = 6: Int
```

### HORIZONTAL_PATH_X

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

```
const val HORIZONTAL_PATH_X = 2: Int
```

### HORIZONTAL_PATH_Y

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

```
const val HORIZONTAL_PATH_Y = 3: Int
```

### PATH_PERCENT

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

```
const val PATH_PERCENT = 0: Int
```

### PATH_PERPENDICULAR

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

```
const val PATH_PERPENDICULAR = 1: Int
```

### ROTATION_LEFT

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

```
const val ROTATION_LEFT = 2: Int
```

### ROTATION_RIGHT

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

```
const val ROTATION_RIGHT = 1: Int
```

### VERTICAL_PATH_X

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

```
const val VERTICAL_PATH_X = 4: Int
```

### VERTICAL_PATH_Y

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

```
const val VERTICAL_PATH_Y = 5: Int
```

## Public functions

### addKey

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

```
fun addKey(key: Key!): Unit
```

Add a key to the MotionController

| Parameters |
|---|---|
| `key: https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/Key!` |   |

### getAnimateRelativeTo

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

```
fun getAnimateRelativeTo(): Int
```

Will return 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://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the view id of the view this is in polar mode to or -1 if not in polar |

### getCenter

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

```
fun getCenter(p: Double, pos: FloatArray<Float>!, vel: FloatArray<Float>!): Unit
```

Get a center and velocities at the position p

| Parameters |
|---|---|
| `p: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html` |   |
| `pos: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html>!` |   |
| `vel: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html>!` |   |

### getCenterX

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

```
fun getCenterX(): Float
```

Get the center X of the motion at the current progress

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` |   |

### getCenterY

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

```
fun getCenterY(): Float
```

Get the center Y of the motion at the current progress

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` |   |

### getDrawPath

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

```
fun getDrawPath(): Int
```

returns the draw path mode

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` |   |

### getFinalHeight

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

```
fun getFinalHeight(): Float
```

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

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the height at the end |

### getFinalWidth

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

```
fun getFinalWidth(): Float
```

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

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the width at the end |

### getFinalX

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

```
fun getFinalX(): Float
```

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

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the left most position |

### getFinalY

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

```
fun getFinalY(): Float
```

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

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the top most position |

### getKeyFrameInfo

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

```
fun getKeyFrameInfo(type: Int, info: IntArray<Int>!): Int
```

Get 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 |
|---|---|
| `info: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>!` | is a data structure array of int that holds info on each keyframe |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Number of keyFrames found |

### getKeyFramePositions

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

```
fun getKeyFramePositions(type: IntArray<Int>!, pos: FloatArray<Float>!): Int
```

Get the keyFrames for the view controlled by this MotionController

| Parameters |
|---|---|
| `type: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>!` | is position(0-100) + 1000\*mType(1=Attr, 2=Pos, 3=TimeCycle 4=Cycle 5=Trigger |
| `pos: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html>!` | the x\&y position of the keyFrame along the path |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Number of keyFrames found |

### getStartHeight

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

```
fun getStartHeight(): Float
```

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

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the height at the start |

### getStartWidth

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

```
fun getStartWidth(): Float
```

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

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the width at the start |

### getStartX

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

```
fun getStartX(): Float
```

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

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the left most position |

### getStartY

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

```
fun getStartY(): Float
```

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

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the top most position |

### getTransformPivotTarget

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

```
fun getTransformPivotTarget(): Int
```

Get the view to pivot around

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | id of view or UNSET if not set |

### getView

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

```
fun getView(): View!
```

Get the view that is being controlled

| Returns |
|---|---|
| `https://developer.android.com/reference/android/view/View.html!` |   |

### remeasure

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

```
fun remeasure(): Unit
```

During the next layout call measure then layout

### setDrawPath

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

```
fun setDrawPath(debugMode: Int): Unit
```

### setPathMotionArc

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

```
fun setPathMotionArc(arc: Int): Unit
```

### setStartState

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

```
fun setStartState(
    rect: ViewState!,
    v: View!,
    rotation: Int,
    preWidth: Int,
    preHeight: Int
): Unit
```

configure the position of the view

| Parameters |
|---|---|
| `rect: https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/utils/ViewState!` |   |
| `v: https://developer.android.com/reference/android/view/View.html!` |   |
| `rotation: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` |   |
| `preWidth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` |   |
| `preHeight: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` |   |

### setTransformPivotTarget

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

```
fun setTransformPivotTarget(transformPivotTarget: Int): Unit
```

Set a view to pivot around

| Parameters |
|---|---|
| `transformPivotTarget: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | id of view |

### setView

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

```
fun setView(view: View!): Unit
```

| Parameters |
|---|---|
| `view: https://developer.android.com/reference/android/view/View.html!` |   |

### setup

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

```
fun setup(
    parentWidth: Int,
    parentHeight: Int,
    transitionDuration: Float,
    currentTime: Long
): Unit
```

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

### setupRelative

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

```
fun setupRelative(motionController: MotionController!): Unit
```

This ties one motionController to another to allow relative pathes

| Parameters |
|---|---|
| `motionController: https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionController!` |   |

### toString

```
fun toString(): String!
```

Debug string

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` |   |