# KeyCycleOscillator

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

*** ** * ** ***


```
abstract class KeyCycleOscillator
```

<br />

Known direct subclasses [KeyCycleOscillator.PathRotateSet](https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/KeyCycleOscillator.PathRotateSet), [ViewOscillator](https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/utils/ViewOscillator)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/KeyCycleOscillator.PathRotateSet` |   |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/utils/ViewOscillator` | Provide the engine for executing cycles. |

Known indirect subclasses [ViewOscillator.PathRotateSet](https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/utils/ViewOscillator.PathRotateSet)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/utils/ViewOscillator.PathRotateSet` |   |

*** ** * ** ***

Provide the engine for executing cycles. KeyCycleOscillator

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/KeyCycleOscillator.PathRotateSet : https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/KeyCycleOscillator` |

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

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/KeyCycleOscillator#get(float)(t: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/CurveFit!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/KeyCycleOscillator#getCurveFit()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/KeyCycleOscillator#getSlope(float)(position: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` |
| `java-static https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/KeyCycleOscillator!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/KeyCycleOscillator#makeWidgetCycle(java.lang.String)(attribute: 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/utils/KeyCycleOscillator#setPoint(int,int,java.lang.String,int,float,float,float,float)( framePosition: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, shape: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, waveString: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, variesBy: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, period: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, offset: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, phase: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html )` sets a oscillator wave point |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/KeyCycleOscillator#setPoint(int,int,java.lang.String,int,float,float,float,float,java.lang.Object)( framePosition: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, shape: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, waveString: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, variesBy: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, period: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, offset: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, phase: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, custom: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html! )` sets a oscillator wave point |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/KeyCycleOscillator#setProperty(androidx.constraintlayout.core.motion.MotionWidget,float)(widget: https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/MotionWidget!, t: 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/utils/KeyCycleOscillator#setType(java.lang.String)(type: 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/utils/KeyCycleOscillator#setup(float)(pathLength: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/KeyCycleOscillator#toString()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/KeyCycleOscillator#variesByPath()()` |

| ### Protected functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/KeyCycleOscillator#setCustom(java.lang.Object)(custom: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!)` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/KeyCycleOscillator#mVariesBy()` |

## Public constructors

### KeyCycleOscillator

Added in 1.1.2

```
KeyCycleOscillator()
```

## Public functions

### get

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

```
fun get(t: Float): Float
```

### getCurveFit

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

```
fun getCurveFit(): CurveFit!
```

### getSlope

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

```
fun getSlope(position: Float): Float
```

### makeWidgetCycle

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

```
java-static fun makeWidgetCycle(attribute: String!): KeyCycleOscillator!
```

### setPoint

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

```
fun setPoint(
    framePosition: Int,
    shape: Int,
    waveString: String!,
    variesBy: Int,
    period: Float,
    offset: Float,
    phase: Float,
    value: Float
): Unit
```

sets a oscillator wave point

| Parameters |
|---|---|
| `framePosition: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the position |
| `variesBy: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | only varies by path supported for now |
| `period: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the period of the wave |
| `offset: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the offset value |
| `value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the adder |

### setPoint

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

```
fun setPoint(
    framePosition: Int,
    shape: Int,
    waveString: String!,
    variesBy: Int,
    period: Float,
    offset: Float,
    phase: Float,
    value: Float,
    custom: Any!
): Unit
```

sets a oscillator wave point

| Parameters |
|---|---|
| `framePosition: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the position |
| `variesBy: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | only varies by path supported for now |
| `period: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the period of the wave |
| `offset: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the offset value |
| `value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the adder |
| `custom: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!` | The ConstraintAttribute used to set the value |

### setProperty

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

```
fun setProperty(widget: MotionWidget!, t: Float): Unit
```

### setType

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

```
fun setType(type: String!): Unit
```

### setup

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

```
fun setup(pathLength: Float): Unit
```

### toString

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

### variesByPath

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

```
fun variesByPath(): Boolean
```

## Protected functions

### setCustom

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

```
protected fun setCustom(custom: Any!): Unit
```

## Public properties

### mVariesBy

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

```
val mVariesBy: Int
```