# ViewTimeCycle.CustomSet

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.CustomSet) Added in [2.2.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#2.2.2)

*** ** * ** ***


```
public class ViewTimeCycle.CustomSet extends ViewTimeCycle
```

<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) ||
|   |   | ↳ | [androidx.constraintlayout.motion.utils.ViewTimeCycle.CustomSet](https://developer.android.com/reference/androidx/constraintlayout/motion/utils/ViewTimeCycle.CustomSet) |

*** ** * ** ***

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/constraintlayout/motion/utils/ViewTimeCycle.CustomSet#CustomSet(java.lang.String,android.util.SparseArray<androidx.constraintlayout.widget.ConstraintAttribute>)(https://developer.android.com/reference/java/lang/String.html attribute, https://developer.android.com/reference/android/util/SparseArray.html<https://developer.android.com/reference/androidx/constraintlayout/widget/ConstraintAttribute> attrList)` |

| ### Public methods |
|---|---|
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/motion/utils/ViewTimeCycle.CustomSet#setPoint(int,androidx.constraintlayout.widget.ConstraintAttribute,float,int,float)( int position, https://developer.android.com/reference/androidx/constraintlayout/widget/ConstraintAttribute value, float period, int shape, float offset )` set the keyTimePoint |
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/motion/utils/ViewTimeCycle.CustomSet#setPoint(int,float,float,int,float)(int position, float value, float period, int shape, float offset)` |
| `boolean` | `https://developer.android.com/reference/androidx/constraintlayout/motion/utils/ViewTimeCycle.CustomSet#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 property of the view given the position the current time |
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/motion/utils/ViewTimeCycle.CustomSet#setup(int)(int curveType)` Setup the curve |

| ### 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#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)` | | `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TimeCycleSplineSet#toString()()` | |
| From [androidx.constraintlayout.motion.utils.ViewTimeCycle](https://developer.android.com/reference/androidx/constraintlayout/motion/utils/ViewTimeCycle) |---|---| | `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 | |

## Public constructors

### CustomSet

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

```
public CustomSet(String attribute, SparseArray<ConstraintAttribute> attrList)
```

## Public methods

### setPoint

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

```
public void setPoint(
    int position,
    ConstraintAttribute value,
    float period,
    int shape,
    float offset
)
```

set the keyTimePoint

| Parameters |
|---|---|
| `int position` |   |
| `https://developer.android.com/reference/androidx/constraintlayout/widget/ConstraintAttribute value` |   |
| `float period` |   |
| `int shape` |   |
| `float offset` |   |

### setPoint

```
public void setPoint(int position, float value, float period, int shape, float offset)
```

| Parameters |
|---|---|
| `int position` |   |
| `float value` |   |
| `float period` |   |
| `int shape` |   |
| `float offset` |   |

### setProperty

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

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

Set the property of the view given the position the current time

| Parameters |
|---|---|
| `https://developer.android.com/reference/android/view/View.html view` | the view to set the property of |
| `float t` | the position on the curve |
| `long time` | the current time |
| `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/KeyCache cache` | the cache used to keep the previous position |

| Returns |
|---|---|
| `boolean` | true if it will need repaint |

### setup

```
public void setup(int curveType)
```

Setup the curve

| Parameters |
|---|---|
| `int curveType` |   |