# Transition

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/state/Transition.java+class:androidx.constraintlayout.core.state.Transition) Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

*** ** * ** ***

<br />

```
class Transition : TypedValues
```

<br />

*** ** * ** ***

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition.WidgetState` |

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#END() = 1` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#INTERPOLATED() = 2` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#START() = 0` |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#Transition(androidx.constraintlayout.core.state.CorePixelDp)(dpToPixel: https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/CorePixelDp)` |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#addCustomColor(int,java.lang.String,java.lang.String,int)(state: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, widgetId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, property: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, color: 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/core/state/Transition#addCustomFloat(int,java.lang.String,java.lang.String,float)(state: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, widgetId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, property: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#addKeyAttribute(java.lang.String,androidx.constraintlayout.core.motion.utils.TypedBundle)(target: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, bundle: https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/TypedBundle!)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#addKeyAttribute(java.lang.String,androidx.constraintlayout.core.motion.utils.TypedBundle,androidx.constraintlayout.core.motion.CustomVariable[])( target: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, bundle: https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/TypedBundle!, custom: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/CustomVariable!>! )` Add a key attribute and the custom variables into the |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#addKeyCycle(java.lang.String,androidx.constraintlayout.core.motion.utils.TypedBundle)(target: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, bundle: https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/TypedBundle!)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#addKeyPosition(java.lang.String,androidx.constraintlayout.core.motion.utils.TypedBundle)(target: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, bundle: https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/TypedBundle!)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#addKeyPosition(java.lang.String,int,int,float,float)(target: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, frame: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, type: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, x: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, y: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#calcStagger()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#clear()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#contains(java.lang.String)(key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#dragToProgress(float,int,int,float,float)( currentProgress: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, baseW: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, baseH: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, dx: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, dy: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html )` Converts from xy drag to progress This should be used till touch up |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#fillKeyPositions(androidx.constraintlayout.core.state.WidgetFrame,float[],float[],float[])( frame: https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/WidgetFrame!, x: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html>!, y: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/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>! )` |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition.KeyPosition!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#findNextPosition(java.lang.String,int)(target: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, frameNumber: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition.KeyPosition!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#findPreviousPosition(java.lang.String,int)(target: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, frameNumber: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#getAutoTransition()()` This gets the auto transition mode being used |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/WidgetFrame!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#getEnd(androidx.constraintlayout.core.widgets.ConstraintWidget)(child: https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/widgets/ConstraintWidget!)` Used in debug draw |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/WidgetFrame!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#getEnd(java.lang.String)(id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#getId(java.lang.String)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/WidgetFrame!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#getInterpolated(androidx.constraintlayout.core.widgets.ConstraintWidget)(child: https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/widgets/ConstraintWidget!)` Used after the interpolation |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/WidgetFrame!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#getInterpolated(java.lang.String)(id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#getInterpolatedHeight()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#getInterpolatedWidth()()` |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Interpolator!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#getInterpolator()()` This gets the interpolator being used |
| `java-static https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Interpolator!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#getInterpolator(int,java.lang.String)(interpolator: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, interpolatorString: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` get the interpolater based on a constant or a string |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#getKeyFrames(java.lang.String,float[],int[],int[])( id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, rectangles: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html>!, pathMode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>!, position: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>! )` |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/Motion!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#getMotion(java.lang.String)(id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#getNumberKeyPositions(androidx.constraintlayout.core.state.WidgetFrame)(frame: https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/WidgetFrame!)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html>!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#getPath(java.lang.String)(id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/WidgetFrame!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#getStart(androidx.constraintlayout.core.widgets.ConstraintWidget)(child: https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/widgets/ConstraintWidget!)` Used in debug draw |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/WidgetFrame!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#getStart(java.lang.String)(id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#getTouchUpProgress(long)(currentTime: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` get the current touch up progress current time in nanoseconds (ideally coming from an animation clock) |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition.WidgetState!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#getWidgetState(java.lang.String,androidx.constraintlayout.core.widgets.ConstraintWidget,int)( widgetId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, child: https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/widgets/ConstraintWidget!, transitionState: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#hasOnSwipe()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#hasPositionKeyframes()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#interpolate(int,int,float)(parentWidth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, parentHeight: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, progress: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#isEmpty()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#isTouchNotDone(float)(currentProgress: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Are we still animating |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#setTouchUp(float,long,float,float)( currentProgress: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, currentTime: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, velocityX: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, velocityY: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html )` Set the start of the touch up |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#setTransitionProperties(androidx.constraintlayout.core.motion.utils.TypedBundle)(bundle: https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/TypedBundle!)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#setValue(int,boolean)(id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Used to set boolean values |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#setValue(int,float)(id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Used to set float values |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#setValue(int,int)(id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Used to set integer values |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#setValue(int,java.lang.String)(id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` Used to set String values |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Transition#updateFrom(androidx.constraintlayout.core.widgets.ConstraintWidgetContainer,int)(container: https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/widgets/ConstraintWidgetContainer!, state: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Update container of parameters for the state |

### Inherited Constants

From [androidx.constraintlayout.core.motion.utils.TypedValues](https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/TypedValues) `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/TypedValues#BOOLEAN_MASK() = 1` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/TypedValues#FLOAT_MASK() = 4` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/TypedValues#INT_MASK() = 2` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/TypedValues#STRING_MASK() = 8` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/TypedValues#S_CUSTOM() = "CUSTOM"` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/TypedValues#TYPE_FRAME_POSITION() = 100` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/TypedValues#TYPE_TARGET() = 101`

## Constants

### END

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

```
const val END = 1: Int
```

### INTERPOLATED

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

```
const val INTERPOLATED = 2: Int
```

### START

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

```
const val START = 0: Int
```

## Public constructors

### Transition

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

```
Transition(dpToPixel: CorePixelDp)
```

## Public functions

### addCustomColor

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

```
fun addCustomColor(state: Int, widgetId: String!, property: String!, color: Int): Unit
```

### addCustomFloat

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

```
fun addCustomFloat(state: Int, widgetId: String!, property: String!, value: Float): Unit
```

### addKeyAttribute

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

```
fun addKeyAttribute(target: String!, bundle: TypedBundle!): Unit
```

### addKeyAttribute

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

```
fun addKeyAttribute(
    target: String!,
    bundle: TypedBundle!,
    custom: Array<CustomVariable!>!
): Unit
```

Add a key attribute and the custom variables into the

| Parameters |
|---|---|
| `target: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | the id of the target |
| `bundle: https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/TypedBundle!` | the key attributes bundle containing position etc. |
| `custom: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/CustomVariable!>!` | the customVariables to add at that position |

### addKeyCycle

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

```
fun addKeyCycle(target: String!, bundle: TypedBundle!): Unit
```

### addKeyPosition

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

```
fun addKeyPosition(target: String!, bundle: TypedBundle!): Unit
```

### addKeyPosition

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

```
fun addKeyPosition(target: String!, frame: Int, type: Int, x: Float, y: Float): Unit
```

### calcStagger

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

```
fun calcStagger(): Unit
```

### clear

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

```
fun clear(): Unit
```

### contains

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

```
fun contains(key: String!): Boolean
```

### dragToProgress

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

```
fun dragToProgress(
    currentProgress: Float,
    baseW: Int,
    baseH: Int,
    dx: Float,
    dy: Float
): Float
```

Converts from xy drag to progress This should be used till touch up

| Parameters |
|---|---|
| `baseW: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | parent width |
| `baseH: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | parent height |
| `dx: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | change in x |
| `dy: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | change in y |

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

### fillKeyPositions

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

```
fun fillKeyPositions(
    frame: WidgetFrame!,
    x: FloatArray<Float>!,
    y: FloatArray<Float>!,
    pos: FloatArray<Float>!
): Unit
```

### findNextPosition

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

```
fun findNextPosition(target: String!, frameNumber: Int): Transition.KeyPosition!
```

### findPreviousPosition

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

```
fun findPreviousPosition(target: String!, frameNumber: Int): Transition.KeyPosition!
```

### getAutoTransition

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

```
fun getAutoTransition(): Int
```

This gets the auto transition mode being used

### getEnd

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

```
fun getEnd(child: ConstraintWidget!): WidgetFrame!
```

Used in debug draw

### getEnd

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

```
fun getEnd(id: String!): WidgetFrame!
```

### getId

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

```
fun getId(name: String!): Int
```

### getInterpolated

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

```
fun getInterpolated(child: ConstraintWidget!): WidgetFrame!
```

Used after the interpolation

### getInterpolated

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

```
fun getInterpolated(id: String!): WidgetFrame!
```

### getInterpolatedHeight

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

```
fun getInterpolatedHeight(): Int
```

### getInterpolatedWidth

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

```
fun getInterpolatedWidth(): Int
```

### getInterpolator

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

```
fun getInterpolator(): Interpolator!
```

This gets the interpolator being used

### getInterpolator

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

```
java-static fun getInterpolator(interpolator: Int, interpolatorString: String!): Interpolator!
```

get the interpolater based on a constant or a string

### getKeyFrames

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

```
fun getKeyFrames(
    id: String!,
    rectangles: FloatArray<Float>!,
    pathMode: IntArray<Int>!,
    position: IntArray<Int>!
): Int
```

### getMotion

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

```
fun getMotion(id: String!): Motion!
```

### getNumberKeyPositions

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

```
fun getNumberKeyPositions(frame: WidgetFrame!): Int
```

### getPath

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

```
fun getPath(id: String!): Array<Float>!
```

### getStart

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

```
fun getStart(child: ConstraintWidget!): WidgetFrame!
```

Used in debug draw

### getStart

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

```
fun getStart(id: String!): WidgetFrame!
```

### getTouchUpProgress

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

```
fun getTouchUpProgress(currentTime: Long): Float
```

get the current touch up progress current time in nanoseconds (ideally coming from an animation clock)

| Parameters |
|---|---|
| `currentTime: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | in nanoseconds |

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

### getWidgetState

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

```
fun getWidgetState(
    widgetId: String!,
    child: ConstraintWidget!,
    transitionState: Int
): Transition.WidgetState!
```

### hasOnSwipe

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

```
fun hasOnSwipe(): Boolean
```

### hasPositionKeyframes

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

```
fun hasPositionKeyframes(): Boolean
```

### interpolate

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

```
fun interpolate(parentWidth: Int, parentHeight: Int, progress: Float): Unit
```

### isEmpty

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

```
fun isEmpty(): Boolean
```

### isTouchNotDone

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

```
fun isTouchNotDone(currentProgress: Float): Boolean
```

Are we still animating

| Parameters |
|---|---|
| `currentProgress: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | motion progress |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | true to continue moving |

### setTouchUp

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

```
fun setTouchUp(
    currentProgress: Float,
    currentTime: Long,
    velocityX: Float,
    velocityY: Float
): Unit
```

Set the start of the touch up

| Parameters |
|---|---|
| `currentProgress: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | 0...1 progress in |
| `currentTime: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | time in nanoseconds |
| `velocityX: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | pixels per millisecond |
| `velocityY: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | pixels per millisecond |

### setTransitionProperties

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

```
fun setTransitionProperties(bundle: TypedBundle!): Unit
```

### setValue

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

```
fun setValue(id: Int, value: Boolean): Boolean
```

Used to set boolean values

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | true if it accepted the value |

### setValue

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

```
fun setValue(id: Int, value: Float): Boolean
```

Used to set float values

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | true if it accepted the value |

### setValue

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

```
fun setValue(id: Int, value: Int): Boolean
```

Used to set integer values

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | true if it accepted the value |

### setValue

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

```
fun setValue(id: Int, value: String!): Boolean
```

Used to set String values

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | true if it accepted the value |

### updateFrom

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

```
fun updateFrom(container: ConstraintWidgetContainer!, state: Int): Unit
```

Update container of parameters for the state

| Parameters |
|---|---|
| `container: https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/widgets/ConstraintWidgetContainer!` | contains all the widget parameters |
| `state: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | starting or ending |