public class MotionKeyCycle extends MotionKey


Summary

Constants

static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final String
WAVE_OFFSET = "waveOffset"
static final String
WAVE_PERIOD = "wavePeriod"
static final String
WAVE_PHASE = "wavePhase"
static final String
WAVE_SHAPE = "waveShape"

Public constructors

Public methods

void
void

Defines method to add a a view to splines derived form this key frame.

MotionKey
void
void
int
getId(String name)
float
void
boolean
setValue(int type, float value)

Used to set float values

boolean
setValue(int type, int value)

Used to set integer values

boolean
setValue(int type, String value)

Used to set String values

Inherited Constants

From androidx.constraintlayout.core.motion.key.MotionKey
static final String
ALPHA = "alpha"
static final String
CUSTOM = "CUSTOM"
static final String
ELEVATION = "elevation"
static final String
ROTATION = "rotationZ"
static final String
ROTATION_X = "rotationX"
static final String
SCALE_X = "scaleX"
static final String
SCALE_Y = "scaleY"
static final String
TRANSITION_PATH_ROTATE = "transitionPathRotate"
static final String
TRANSLATION_X = "translationX"
static final String
TRANSLATION_Y = "translationY"
static final String
VISIBILITY = "visibility"
From androidx.constraintlayout.core.motion.utils.TypedValues
static final int
static final int
static final int
static final int
static final String
S_CUSTOM = "CUSTOM"
static final int
static final int

Inherited methods

From androidx.constraintlayout.core.motion.key.MotionKey
MotionKey
int

Gets the current frame position

void
setCustomAttribute(String name, int type, boolean value)
void
setCustomAttribute(String name, int type, float value)
void
setCustomAttribute(String name, int type, int value)
void
setCustomAttribute(String name, int type, String value)
void

sets the frame position

void

Key frame can specify the type of interpolation it wants on various attributes For each string it set it to -1, CurveFit.LINEAR or CurveFit.SPLINE

boolean
setValue(int type, boolean value)

Used to set boolean values

MotionKey
setViewId(int id)
From androidx.constraintlayout.core.motion.utils.TypedValues
abstract boolean
setValue(int id, boolean value)

Used to set boolean values

abstract boolean
setValue(int id, float value)

Used to set float values

abstract boolean
setValue(int id, int value)

Used to set integer values

abstract boolean
setValue(int id, String value)

Used to set String values

Constants

KEY_TYPE

Added in 1.1.0
public static final int KEY_TYPE = 4

SHAPE_BOUNCE

Added in 1.1.0
public static final int SHAPE_BOUNCE = 6

SHAPE_COS_WAVE

Added in 1.1.0
public static final int SHAPE_COS_WAVE = 5

SHAPE_REVERSE_SAW_WAVE

Added in 1.1.0
public static final int SHAPE_REVERSE_SAW_WAVE = 4

SHAPE_SAW_WAVE

Added in 1.1.0
public static final int SHAPE_SAW_WAVE = 3

SHAPE_SIN_WAVE

Added in 1.1.0
public static final int SHAPE_SIN_WAVE = 0

SHAPE_SQUARE_WAVE

Added in 1.1.0
public static final int SHAPE_SQUARE_WAVE = 1

SHAPE_TRIANGLE_WAVE

Added in 1.1.0
public static final int SHAPE_TRIANGLE_WAVE = 2

WAVE_OFFSET

Added in 1.1.0
public static final String WAVE_OFFSET = "waveOffset"

WAVE_PERIOD

Added in 1.1.0
public static final String WAVE_PERIOD = "wavePeriod"

WAVE_PHASE

Added in 1.1.0
public static final String WAVE_PHASE = "wavePhase"

WAVE_SHAPE

Added in 1.1.0
public static final String WAVE_SHAPE = "waveShape"

Public constructors

MotionKeyCycle

Added in 1.1.0
public MotionKeyCycle()

Public methods

addCycleValues

Added in 1.1.0
public void addCycleValues(HashMap<StringKeyCycleOscillator> oscSet)

addValues

Added in 1.1.0
public void addValues(HashMap<StringSplineSet> splines)

Defines method to add a a view to splines derived form this key frame. The values are written to the spline

Parameters
HashMap<StringSplineSet> splines

splines to write values to

clone

Added in 1.1.0
public MotionKey clone()

dump

Added in 1.1.0
public void dump()

getAttributeNames

Added in 1.1.0
public void getAttributeNames(HashSet<String> attributes)

getId

Added in 1.1.0
public int getId(String name)

getValue

Added in 1.1.0
public float getValue(String key)

printAttributes

Added in 1.1.0
public void printAttributes()

setValue

public boolean setValue(int type, float value)

Used to set float values

Returns
boolean

true if it accepted the value

setValue

public boolean setValue(int type, int value)

Used to set integer values

Returns
boolean

true if it accepted the value

setValue

public boolean setValue(int type, String value)

Used to set String values

Returns
boolean

true if it accepted the value