ViewTimeCycle.CustomSet

public class ViewTimeCycle.CustomSet extends ViewTimeCycle


Summary

Public constructors

Public methods

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

set the keyTimePoint

void
setPoint(int position, float value, float period, int shape, float offset)
boolean
setProperty(View view, float t, long time, KeyCache cache)

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

void
setup(int curveType)

Setup the curve

Inherited Constants

From androidx.constraintlayout.core.motion.utils.TimeCycleSplineSet
static final int
static final int
static final int

Inherited methods

From androidx.constraintlayout.core.motion.utils.TimeCycleSplineSet
float
calcWave(float period)
CurveFit
void
setStartTime(long currentTime)
void
String
From androidx.constraintlayout.motion.utils.ViewTimeCycle
float
get(float pos, long time, View view, KeyCache cache)

get a value from the time cycle

static ViewTimeCycle

make a custom time cycle

static ViewTimeCycle
makeSpline(String str, long currentTime)

Make a time cycle spline

Public constructors

CustomSet

Added in 2.2.0-alpha13
public CustomSet(String attribute, SparseArray<ConstraintAttribute> attrList)

Public methods

setPoint

Added in 2.2.0-alpha13
public void setPoint(
    int position,
    ConstraintAttribute value,
    float period,
    int shape,
    float offset
)

set the keyTimePoint

Parameters
int position
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.0-alpha13
public boolean setProperty(View view, float t, long time, KeyCache cache)

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

Parameters
View view

the view to set the property of

float t

the position on the curve

long time

the current time

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