# ViewTimeCycle

Artifact: [androidx.constraintlayout:constraintlayout](https://developer.android.com/jetpack/androidx/releases/constraintlayout) [View Source](https://cs.android.com/search?q=file:androidx/constraintlayout/motion/utils/ViewTimeCycle.java+class:androidx.constraintlayout.motion.utils.ViewTimeCycle) Added in [2.2.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#2.2.2)

*** ** * ** ***


```
public abstract class ViewTimeCycle extends TimeCycleSplineSet
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.constraintlayout.core.motion.utils.TimeCycleSplineSet](https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TimeCycleSplineSet) ||
|   | ↳ | [androidx.constraintlayout.motion.utils.ViewTimeCycle](https://developer.android.com/reference/androidx/constraintlayout/motion/utils/ViewTimeCycle) |

Known direct subclasses [ViewTimeCycle.CustomSet](https://developer.android.com/reference/androidx/constraintlayout/motion/utils/ViewTimeCycle.CustomSet), [ViewTimeCycle.PathRotate](https://developer.android.com/reference/androidx/constraintlayout/motion/utils/ViewTimeCycle.PathRotate)

|---|---|
| `https://developer.android.com/reference/androidx/constraintlayout/motion/utils/ViewTimeCycle.CustomSet` |   |
| `https://developer.android.com/reference/androidx/constraintlayout/motion/utils/ViewTimeCycle.PathRotate` |   |

*** ** * ** ***

This engine allows manipulation of attributes by wave shapes oscillating in time

## Summary

| ### Nested types |
|---|
| `public class https://developer.android.com/reference/androidx/constraintlayout/motion/utils/ViewTimeCycle.CustomSet extends https://developer.android.com/reference/androidx/constraintlayout/motion/utils/ViewTimeCycle` |
| `public class https://developer.android.com/reference/androidx/constraintlayout/motion/utils/ViewTimeCycle.PathRotate extends https://developer.android.com/reference/androidx/constraintlayout/motion/utils/ViewTimeCycle` |

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

| ### Public methods |
|---|---|
| `float` | `https://developer.android.com/reference/androidx/constraintlayout/motion/utils/ViewTimeCycle#get(float,long,android.view.View,androidx.constraintlayout.core.motion.utils.KeyCache)(float pos, long time, https://developer.android.com/reference/android/view/View.html view, https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/KeyCache cache)` get a value from the time cycle |
| `static https://developer.android.com/reference/androidx/constraintlayout/motion/utils/ViewTimeCycle` | `https://developer.android.com/reference/androidx/constraintlayout/motion/utils/ViewTimeCycle#makeCustomSpline(java.lang.String,android.util.SparseArray<androidx.constraintlayout.widget.ConstraintAttribute>)(https://developer.android.com/reference/java/lang/String.html str, https://developer.android.com/reference/android/util/SparseArray.html<https://developer.android.com/reference/androidx/constraintlayout/widget/ConstraintAttribute> attrList)` make a custom time cycle |
| `static https://developer.android.com/reference/androidx/constraintlayout/motion/utils/ViewTimeCycle` | `https://developer.android.com/reference/androidx/constraintlayout/motion/utils/ViewTimeCycle#makeSpline(java.lang.String,long)(https://developer.android.com/reference/java/lang/String.html str, long currentTime)` Make a time cycle spline |
| `abstract boolean` | `https://developer.android.com/reference/androidx/constraintlayout/motion/utils/ViewTimeCycle#setProperty(android.view.View,float,long,androidx.constraintlayout.core.motion.utils.KeyCache)(https://developer.android.com/reference/android/view/View.html view, float t, long time, https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/KeyCache cache)` Set the time cycle parameters |

| ### Inherited Constants |
|---|
| From [androidx.constraintlayout.core.motion.utils.TimeCycleSplineSet](https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TimeCycleSplineSet) |---|---| | `static final int` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TimeCycleSplineSet#CURVE_OFFSET() = 2` | | `static final int` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TimeCycleSplineSet#CURVE_PERIOD() = 1` | | `static final int` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TimeCycleSplineSet#CURVE_VALUE() = 0` | |

| ### Inherited fields |
|---|
| From [androidx.constraintlayout.core.motion.utils.TimeCycleSplineSet](https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TimeCycleSplineSet) |---|---| | `float[]` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TimeCycleSplineSet#mCache()` | | `boolean` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TimeCycleSplineSet#mContinue()` | | `int` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TimeCycleSplineSet#mCount()` | | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/CurveFit` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TimeCycleSplineSet#mCurveFit()` | | `float` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TimeCycleSplineSet#mLastCycle()` | | `long` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TimeCycleSplineSet#mLastTime()` | | `int[]` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TimeCycleSplineSet#mTimePoints()` | | `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TimeCycleSplineSet#mType()` | | `float[][]` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TimeCycleSplineSet#mValues()` | | `int` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TimeCycleSplineSet#mWaveShape()` | | `static float` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TimeCycleSplineSet#sVal2PI()` | |

| ### Inherited methods |
|---|
| From [androidx.constraintlayout.core.motion.utils.TimeCycleSplineSet](https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TimeCycleSplineSet) |---|---| | `float` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TimeCycleSplineSet#calcWave(float)(float period)` | | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/CurveFit` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TimeCycleSplineSet#getCurveFit()()` | | `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TimeCycleSplineSet#setPoint(int,float,float,int,float)(int position, float value, float period, int shape, float offset)` | | `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TimeCycleSplineSet#setStartTime(long)(long currentTime)` | | `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TimeCycleSplineSet#setType(java.lang.String)(https://developer.android.com/reference/java/lang/String.html type)` | | `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TimeCycleSplineSet#setup(int)(int curveType)` | | `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TimeCycleSplineSet#toString()()` | |

## Public constructors

### ViewTimeCycle

Added in 2.2.2

```
public ViewTimeCycle()
```

## Public methods

### get

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

```
public float get(float pos, long time, View view, KeyCache cache)
```

get a value from the time cycle

| Parameters |
|---|---|
| `float pos` |   |
| `long time` |   |
| `https://developer.android.com/reference/android/view/View.html view` |   |
| `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/KeyCache cache` |   |

| Returns |
|---|---|
| `float` |   |

### makeCustomSpline

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

```
public static ViewTimeCycle makeCustomSpline(String str, SparseArray<ConstraintAttribute> attrList)
```

make a custom time cycle

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/lang/String.html str` |   |
| `https://developer.android.com/reference/android/util/SparseArray.html<https://developer.android.com/reference/androidx/constraintlayout/widget/ConstraintAttribute> attrList` |   |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/constraintlayout/motion/utils/ViewTimeCycle` |   |

### makeSpline

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

```
public static ViewTimeCycle makeSpline(String str, long currentTime)
```

Make a time cycle spline

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/lang/String.html str` |   |
| `long currentTime` |   |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/constraintlayout/motion/utils/ViewTimeCycle` |   |

### setProperty

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

```
public abstract boolean setProperty(View view, float t, long time, KeyCache cache)
```

Set the time cycle parameters

| Parameters |
|---|---|
| `https://developer.android.com/reference/android/view/View.html view` |   |
| `float t` |   |
| `long time` |   |
| `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/KeyCache cache` |   |

| Returns |
|---|---|
| `boolean` |   |