# CoreMotionScene

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

*** ** * ** ***


```
interface CoreMotionScene
```

<br />

Known direct subclasses [MotionScene](https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionScene)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionScene` | Information for MotionLayout to animate between multiple `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintSet`s. |

*** ** * ** ***

This defines the interface to motionScene functionality

## Summary

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/CoreMotionScene#getConstraintSet(java.lang.String)(ext: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` Get the ConstraintSet as a string |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/CoreMotionScene#getConstraintSet(int)(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` get a constraintset |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/CoreMotionScene#getTransition(java.lang.String)(str: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` get a transition give the name |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/CoreMotionScene#setConstraintSetContent(java.lang.String,java.lang.String)(csName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, toJSON: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` set the constraintSet json string |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/CoreMotionScene#setDebugName(java.lang.String)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` set the debug name for remote access |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/CoreMotionScene#setTransitionContent(java.lang.String,java.lang.String)(elementName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, toJSON: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` set the Transitions string onto the MotionScene |

## Public functions

### getConstraintSet

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

```
fun getConstraintSet(ext: String!): String!
```

Get the ConstraintSet as a string

### getConstraintSet

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

```
fun getConstraintSet(index: Int): String!
```

get a constraintset

| Parameters |
|---|---|
| `index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | of the constraintset |

### getTransition

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

```
fun getTransition(str: String!): String!
```

get a transition give the name

| Parameters |
|---|---|
| `str: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | the name of the transition |

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

### setConstraintSetContent

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

```
fun setConstraintSetContent(csName: String!, toJSON: String!): Unit
```

set the constraintSet json string

| Parameters |
|---|---|
| `csName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | the name of the constraint set |
| `toJSON: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | the json string of the constraintset |

### setDebugName

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

```
fun setDebugName(name: String!): Unit
```

set the debug name for remote access

| Parameters |
|---|---|
| `name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | name to call this motion scene |

### setTransitionContent

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

```
fun setTransitionContent(elementName: String!, toJSON: String!): Unit
```

set the Transitions string onto the MotionScene

| Parameters |
|---|---|
| `elementName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | the name of the element |