# MotionKeyTrigger

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

*** ** * ** ***


```
class MotionKeyTrigger : MotionKey
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.constraintlayout.core.motion.key.MotionKey](https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKey) ||
|   | ↳ | [androidx.constraintlayout.core.motion.key.MotionKeyTrigger](https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKeyTrigger) |

*** ** * ** ***

## Summary

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKeyTrigger#CROSS() = "CROSS"` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKeyTrigger#KEY_TYPE() = 5` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKeyTrigger#NEGATIVE_CROSS() = "negativeCross"` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKeyTrigger#POSITIVE_CROSS() = "positiveCross"` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKeyTrigger#POST_LAYOUT() = "postLayout"` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKeyTrigger#TRIGGER_COLLISION_ID() = "triggerCollisionId"` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKeyTrigger#TRIGGER_COLLISION_VIEW() = "triggerCollisionView"` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKeyTrigger#TRIGGER_ID() = "triggerID"` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKeyTrigger#TRIGGER_RECEIVER() = "triggerReceiver"` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKeyTrigger#TRIGGER_SLACK() = "triggerSlack"` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKeyTrigger#TYPE_CROSS() = 312` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKeyTrigger#TYPE_NEGATIVE_CROSS() = 310` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKeyTrigger#TYPE_POSITIVE_CROSS() = 309` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKeyTrigger#TYPE_POST_LAYOUT() = 304` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKeyTrigger#TYPE_TRIGGER_COLLISION_ID() = 307` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKeyTrigger#TYPE_TRIGGER_COLLISION_VIEW() = 306` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKeyTrigger#TYPE_TRIGGER_ID() = 308` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKeyTrigger#TYPE_TRIGGER_RECEIVER() = 311` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKeyTrigger#TYPE_TRIGGER_SLACK() = 305` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKeyTrigger#TYPE_VIEW_TRANSITION_ON_CROSS() = 301` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKeyTrigger#TYPE_VIEW_TRANSITION_ON_NEGATIVE_CROSS() = 303` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKeyTrigger#TYPE_VIEW_TRANSITION_ON_POSITIVE_CROSS() = 302` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKeyTrigger#VIEW_TRANSITION_ON_CROSS() = "viewTransitionOnCross"` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKeyTrigger#VIEW_TRANSITION_ON_NEGATIVE_CROSS() = "viewTransitionOnNegativeCross"` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKeyTrigger#VIEW_TRANSITION_ON_POSITIVE_CROSS() = "viewTransitionOnPositiveCross"` |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKeyTrigger#MotionKeyTrigger()()` |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKeyTrigger#addValues(java.util.HashMap<java.lang.String,androidx.constraintlayout.core.motion.utils.SplineSet>)(splines: https://developer.android.com/reference/java/util/HashMap.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/SplineSet!>!)` Defines method to add a a view to splines derived form this key frame. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKey!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKeyTrigger#clone()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKeyTrigger#conditionallyFire(float,androidx.constraintlayout.core.motion.MotionWidget)(position: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, child: https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/MotionWidget!)` |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKeyTrigger!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKeyTrigger#copy(androidx.constraintlayout.core.motion.key.MotionKey)(src: https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKey!)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKeyTrigger#getAttributeNames(java.util.HashSet<java.lang.String>)(attributes: https://developer.android.com/reference/java/util/HashSet.html<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/motion/key/MotionKeyTrigger#getId(java.lang.String)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKeyTrigger#setValue(int,boolean)(type: 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/motion/key/MotionKeyTrigger#setValue(int,float)(type: 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/motion/key/MotionKeyTrigger#setValue(int,int)(type: 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/motion/key/MotionKeyTrigger#setValue(int,java.lang.String)(type: 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 |

| ### Inherited Constants |
|---|
| From [androidx.constraintlayout.core.motion.key.MotionKey](https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKey) |---|---| | `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKey#ALPHA() = "alpha"` | | `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKey#CUSTOM() = "CUSTOM"` | | `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKey#ELEVATION() = "elevation"` | | `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKey#ROTATION() = "rotationZ"` | | `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKey#ROTATION_X() = "rotationX"` | | `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKey#SCALE_X() = "scaleX"` | | `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKey#SCALE_Y() = "scaleY"` | | `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKey#TRANSITION_PATH_ROTATE() = "transitionPathRotate"` | | `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKey#TRANSLATION_X() = "translationX"` | | `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKey#TRANSLATION_Y() = "translationY"` | | `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKey#VISIBILITY() = "visibility"` | |
| 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` | |

| ### Inherited functions |
|---|
| From [androidx.constraintlayout.core.motion.key.MotionKey](https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKey) |---|---| | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKey#getFramePosition()()` Gets the current frame position | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKey#setCustomAttribute(java.lang.String,int,boolean)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, type: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKey#setCustomAttribute(java.lang.String,int,float)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, type: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/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/motion/key/MotionKey#setCustomAttribute(java.lang.String,int,int)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, type: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, value: 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/motion/key/MotionKey#setCustomAttribute(java.lang.String,int,java.lang.String)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, type: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKey#setFramePosition(int)(pos: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` sets the frame position | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKey#setInterpolation(java.util.HashMap<java.lang.String,java.lang.Integer>)(interpolation: https://developer.android.com/reference/java/util/HashMap.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html!>!)` Key frame can specify the type of interpolation it wants on various attributes For each string it set it to -1, CurveFit.LINEAR or CurveFit.SPLINE | | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKey!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKey#setViewId(int)(id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` | |
| From [androidx.constraintlayout.core.motion.utils.TypedValues](https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/TypedValues) |---|---| | `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/TypedValues#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 | | `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/TypedValues#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 | | `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/TypedValues#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 | | `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/TypedValues#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 | |

| ### Inherited properties |
|---|
| From [androidx.constraintlayout.core.motion.key.MotionKey](https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKey) |---|---| | `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKey#UNSET()` | | `https://developer.android.com/reference/java/util/HashMap.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/CustomVariable!>!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKey#mCustom()` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKey#mFramePosition()` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/key/MotionKey#mType()` | |

## Constants

### CROSS

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

```
const val CROSS = "CROSS": String!
```

### KEY_TYPE

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

```
const val KEY_TYPE = 5: Int
```

### NEGATIVE_CROSS

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

```
const val NEGATIVE_CROSS = "negativeCross": String!
```

### POSITIVE_CROSS

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

```
const val POSITIVE_CROSS = "positiveCross": String!
```

### POST_LAYOUT

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

```
const val POST_LAYOUT = "postLayout": String!
```

### TRIGGER_COLLISION_ID

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

```
const val TRIGGER_COLLISION_ID = "triggerCollisionId": String!
```

### TRIGGER_COLLISION_VIEW

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

```
const val TRIGGER_COLLISION_VIEW = "triggerCollisionView": String!
```

### TRIGGER_ID

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

```
const val TRIGGER_ID = "triggerID": String!
```

### TRIGGER_RECEIVER

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

```
const val TRIGGER_RECEIVER = "triggerReceiver": String!
```

### TRIGGER_SLACK

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

```
const val TRIGGER_SLACK = "triggerSlack": String!
```

### TYPE_CROSS

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

```
const val TYPE_CROSS = 312: Int
```

### TYPE_NEGATIVE_CROSS

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

```
const val TYPE_NEGATIVE_CROSS = 310: Int
```

### TYPE_POSITIVE_CROSS

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

```
const val TYPE_POSITIVE_CROSS = 309: Int
```

### TYPE_POST_LAYOUT

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

```
const val TYPE_POST_LAYOUT = 304: Int
```

### TYPE_TRIGGER_COLLISION_ID

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

```
const val TYPE_TRIGGER_COLLISION_ID = 307: Int
```

### TYPE_TRIGGER_COLLISION_VIEW

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

```
const val TYPE_TRIGGER_COLLISION_VIEW = 306: Int
```

### TYPE_TRIGGER_ID

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

```
const val TYPE_TRIGGER_ID = 308: Int
```

### TYPE_TRIGGER_RECEIVER

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

```
const val TYPE_TRIGGER_RECEIVER = 311: Int
```

### TYPE_TRIGGER_SLACK

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

```
const val TYPE_TRIGGER_SLACK = 305: Int
```

### TYPE_VIEW_TRANSITION_ON_CROSS

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

```
const val TYPE_VIEW_TRANSITION_ON_CROSS = 301: Int
```

### TYPE_VIEW_TRANSITION_ON_NEGATIVE_CROSS

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

```
const val TYPE_VIEW_TRANSITION_ON_NEGATIVE_CROSS = 303: Int
```

### TYPE_VIEW_TRANSITION_ON_POSITIVE_CROSS

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

```
const val TYPE_VIEW_TRANSITION_ON_POSITIVE_CROSS = 302: Int
```

### VIEW_TRANSITION_ON_CROSS

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

```
const val VIEW_TRANSITION_ON_CROSS = "viewTransitionOnCross": String!
```

### VIEW_TRANSITION_ON_NEGATIVE_CROSS

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

```
const val VIEW_TRANSITION_ON_NEGATIVE_CROSS = "viewTransitionOnNegativeCross": String!
```

### VIEW_TRANSITION_ON_POSITIVE_CROSS

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

```
const val VIEW_TRANSITION_ON_POSITIVE_CROSS = "viewTransitionOnPositiveCross": String!
```

## Public constructors

### MotionKeyTrigger

Added in 1.1.2

```
MotionKeyTrigger()
```

## Public functions

### addValues

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

```
fun addValues(splines: HashMap<String!, SplineSet!>!): Unit
```

Defines method to add a a view to splines derived form this key frame. The values are written to the spline

| Parameters |
|---|---|
| `splines: https://developer.android.com/reference/java/util/HashMap.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/SplineSet!>!` | splines to write values to |

### clone

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

```
fun clone(): MotionKey!
```

### conditionallyFire

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

```
fun conditionallyFire(position: Float, child: MotionWidget!): Unit
```

### copy

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

```
fun copy(src: MotionKey!): MotionKeyTrigger!
```

### getAttributeNames

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

```
fun getAttributeNames(attributes: HashSet<String!>!): Unit
```

### getId

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

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

### setValue

```
fun setValue(type: 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

```
fun setValue(type: 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

```
fun setValue(type: 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

```
fun setValue(type: 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 |