# KeyAttributes

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

*** ** * ** ***

<br />

```
class KeyAttributes : Keys
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.constraintlayout.core.dsl.Keys](https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/dsl/Keys) ||
|   | ↳ | [androidx.constraintlayout.core.dsl.KeyAttributes](https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/dsl/KeyAttributes) |

Known direct subclasses [KeyCycles](https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/dsl/KeyCycles)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/dsl/KeyCycles` | Provides the API for creating a KeyCycle Object for use in the Core ConstraintLayout \&MotionLayout system This allows multiple KeyCycle positions to defined in one object. |

*** ** * ** ***

Provides the API for creating a KeyAttribute Object for use in the Core ConstraintLayout \&MotionLayout system This allows multiple KeyAttribute positions to defined in one object.

## Summary

| ### Nested types |
|---|
| `enum https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/dsl/KeyAttributes.Fit` |
| `enum https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/dsl/KeyAttributes.Visibility` |

| ### Public functions |
|---|---|
| `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/dsl/KeyAttributes#getAlpha()()` |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/dsl/KeyAttributes.Fit!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/dsl/KeyAttributes#getCurveFit()()` |
| `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/dsl/KeyAttributes#getPivotX()()` |
| `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/dsl/KeyAttributes#getPivotY()()` |
| `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/dsl/KeyAttributes#getRotation()()` |
| `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/dsl/KeyAttributes#getRotationX()()` |
| `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/dsl/KeyAttributes#getRotationY()()` |
| `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/dsl/KeyAttributes#getScaleX()()` |
| `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/dsl/KeyAttributes#getScaleY()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/dsl/KeyAttributes#getTarget()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/dsl/KeyAttributes#getTransitionEasing()()` |
| `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/dsl/KeyAttributes#getTransitionPathRotate()()` |
| `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/dsl/KeyAttributes#getTranslationX()()` |
| `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/dsl/KeyAttributes#getTranslationY()()` |
| `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/dsl/KeyAttributes#getTranslationZ()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/dsl/KeyAttributes.Visibility!>!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/dsl/KeyAttributes#getVisibility()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/dsl/KeyAttributes#setAlpha(float...)(alpha: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html<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/KeyAttributes#setCurveFit(androidx.constraintlayout.core.dsl.KeyAttributes.Fit)(curveFit: https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/dsl/KeyAttributes.Fit!)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/dsl/KeyAttributes#setPivotX(float...)(pivotX: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html<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/KeyAttributes#setPivotY(float...)(pivotY: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html<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/KeyAttributes#setRotation(float...)(rotation: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html<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/KeyAttributes#setRotationX(float...)(rotationX: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html<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/KeyAttributes#setRotationY(float...)(rotationY: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html<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/KeyAttributes#setScaleX(float[])(scaleX: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html<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/KeyAttributes#setScaleY(float[])(scaleY: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html<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/KeyAttributes#setTarget(java.lang.String[])(target: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<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/KeyAttributes#setTransitionEasing(java.lang.String)(transitionEasing: 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/KeyAttributes#setTransitionPathRotate(float...)(transitionPathRotate: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html<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/KeyAttributes#setTranslationX(float[])(translationX: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html<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/KeyAttributes#setTranslationY(float[])(translationY: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html<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/KeyAttributes#setTranslationZ(float[])(translationZ: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html<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/KeyAttributes#setVisibility(androidx.constraintlayout.core.dsl.KeyAttributes.Visibility...)(visibility: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/dsl/KeyAttributes.Visibility!>!)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/dsl/KeyAttributes#toString()()` |

| ### Protected functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/dsl/KeyAttributes#attributesToString(java.lang.StringBuilder)(builder: https://developer.android.com/reference/java/lang/StringBuilder.html!)` |

| ### Protected properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/dsl/KeyAttributes#TYPE()` |

### Inherited functions

From [androidx.constraintlayout.core.dsl.Keys](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/Keys#append(java.lang.StringBuilder,java.lang.String,java.lang.String[])(builder: https://developer.android.com/reference/java/lang/StringBuilder.html!, name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, array: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<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/Keys#append(java.lang.StringBuilder,java.lang.String,float[])(builder: https://developer.android.com/reference/java/lang/StringBuilder.html!, name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, array: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html<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/Keys#append(java.lang.StringBuilder,java.lang.String,float)(builder: https://developer.android.com/reference/java/lang/StringBuilder.html!, name: 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/dsl/Keys#append(java.lang.StringBuilder,java.lang.String,int)(builder: https://developer.android.com/reference/java/lang/StringBuilder.html!, name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/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/dsl/Keys#append(java.lang.StringBuilder,java.lang.String,java.lang.String)(builder: https://developer.android.com/reference/java/lang/StringBuilder.html!, name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, value: 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/Keys#unpack(java.lang.String[])(str: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!)`

## Public functions

### getAlpha

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

```
fun getAlpha(): Array<Float>!
```

### getCurveFit

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

```
fun getCurveFit(): KeyAttributes.Fit!
```

### getPivotX

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

```
fun getPivotX(): Array<Float>!
```

### getPivotY

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

```
fun getPivotY(): Array<Float>!
```

### getRotation

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

```
fun getRotation(): Array<Float>!
```

### getRotationX

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

```
fun getRotationX(): Array<Float>!
```

### getRotationY

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

```
fun getRotationY(): Array<Float>!
```

### getScaleX

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

```
fun getScaleX(): Array<Float>!
```

### getScaleY

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

```
fun getScaleY(): Array<Float>!
```

### getTarget

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

```
fun getTarget(): Array<String!>!
```

### getTransitionEasing

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

```
fun getTransitionEasing(): String!
```

### getTransitionPathRotate

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

```
fun getTransitionPathRotate(): Array<Float>!
```

### getTranslationX

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

```
fun getTranslationX(): Array<Float>!
```

### getTranslationY

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

```
fun getTranslationY(): Array<Float>!
```

### getTranslationZ

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

```
fun getTranslationZ(): Array<Float>!
```

### getVisibility

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

```
fun getVisibility(): Array<KeyAttributes.Visibility!>!
```

### setAlpha

```
fun setAlpha(alpha: FloatArray<Float>!): Unit
```

### setCurveFit

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

```
fun setCurveFit(curveFit: KeyAttributes.Fit!): Unit
```

### setPivotX

```
fun setPivotX(pivotX: FloatArray<Float>!): Unit
```

### setPivotY

```
fun setPivotY(pivotY: FloatArray<Float>!): Unit
```

### setRotation

```
fun setRotation(rotation: FloatArray<Float>!): Unit
```

### setRotationX

```
fun setRotationX(rotationX: FloatArray<Float>!): Unit
```

### setRotationY

```
fun setRotationY(rotationY: FloatArray<Float>!): Unit
```

### setScaleX

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

```
fun setScaleX(scaleX: FloatArray<Float>!): Unit
```

### setScaleY

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

```
fun setScaleY(scaleY: FloatArray<Float>!): Unit
```

### setTarget

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

```
fun setTarget(target: Array<String!>!): Unit
```

### setTransitionEasing

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

```
fun setTransitionEasing(transitionEasing: String!): Unit
```

### setTransitionPathRotate

```
fun setTransitionPathRotate(transitionPathRotate: FloatArray<Float>!): Unit
```

### setTranslationX

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

```
fun setTranslationX(translationX: FloatArray<Float>!): Unit
```

### setTranslationY

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

```
fun setTranslationY(translationY: FloatArray<Float>!): Unit
```

### setTranslationZ

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

```
fun setTranslationZ(translationZ: FloatArray<Float>!): Unit
```

### setVisibility

```
fun setVisibility(visibility: Array<KeyAttributes.Visibility!>!): Unit
```

### toString

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

## Protected functions

### attributesToString

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

```
protected fun attributesToString(builder: StringBuilder!): Unit
```

## Protected properties

### TYPE

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

```
protected val TYPE: String!
```