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

*** ** * ** ***


```
class Transition
```

<br />

*** ** * ** ***

Create a Transition Object. Transition objects reference the start and end Constraints

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/dsl/Transition#Transition(java.lang.String,java.lang.String)(from: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, to: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/dsl/Transition#Transition(java.lang.String,java.lang.String,java.lang.String)(id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, from: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, to: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/dsl/Transition#getId()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/dsl/Transition#setDuration(int)(duration: 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/dsl/Transition#setFrom(java.lang.String)(constraintSetStart: 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/dsl/Transition#setId(java.lang.String)(id: 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/dsl/Transition#setKeyFrames(androidx.constraintlayout.core.dsl.Keys)(keyFrames: https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/dsl/Keys!)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/dsl/Transition#setOnSwipe(androidx.constraintlayout.core.dsl.OnSwipe)(onSwipe: https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/dsl/OnSwipe!)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/dsl/Transition#setStagger(float)(stagger: 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/dsl/Transition#setTo(java.lang.String)(constraintSetEnd: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/dsl/Transition#toString()()` |

## Public constructors

### Transition

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

```
Transition(from: String!, to: String!)
```

### Transition

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

```
Transition(id: String!, from: String!, to: String!)
```

## Public functions

### getId

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

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

### setDuration

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

```
fun setDuration(duration: Int): Unit
```

### setFrom

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

```
fun setFrom(constraintSetStart: String!): Unit
```

### setId

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

```
fun setId(id: String!): Unit
```

### setKeyFrames

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

```
fun setKeyFrames(keyFrames: Keys!): Unit
```

### setOnSwipe

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

```
fun setOnSwipe(onSwipe: OnSwipe!): Unit
```

### setStagger

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

```
fun setStagger(stagger: Float): Unit
```

### setTo

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

```
fun setTo(constraintSetEnd: String!): Unit
```

### toString

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