public class KeyCycle extends Key


Provide the passive data structure to get KeyPosition information form XML

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

Add this key cycle to the keyCycle engines

void

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

Key

Clone this KeyAttributes

Key
copy(Key src)

Copy the key

void
float

get the value for a given attribute of the keyCycel

void
load(Context context, AttributeSet attrs)

Load the KeyCycle from xml attributes

void
setValue(String tag, Object value)

Set the value associated with this tag

Inherited Constants

From androidx.constraintlayout.motion.widget.Key
static final String
ALPHA = "alpha"
static final String
CURVEFIT = "curveFit"
static final String
CUSTOM = "CUSTOM"
static final String
ELEVATION = "elevation"
static final String
MOTIONPROGRESS = "motionProgress"
static final String
PIVOT_X = "transformPivotX"
static final String
PIVOT_Y = "transformPivotY"
static final String
PROGRESS = "progress"
static final String
ROTATION = "rotation"
static final String
ROTATION_X = "rotationX"
static final String
ROTATION_Y = "rotationY"
static final String
SCALE_X = "scaleX"
static final String
SCALE_Y = "scaleY"
static final String
TRANSITIONEASING = "transitionEasing"
static final String
TRANSITION_PATH_ROTATE = "transitionPathRotate"
static final String
TRANSLATION_X = "translationX"
static final String
TRANSLATION_Y = "translationY"
static final String
TRANSLATION_Z = "translationZ"
static final String
VISIBILITY = "visibility"
static final String
WAVE_OFFSET = "waveOffset"
static final String
WAVE_PERIOD = "wavePeriod"
static final String
WAVE_PHASE = "wavePhase"
static final String
WAVE_VARIES_BY = "waveVariesBy"

Inherited fields

From androidx.constraintlayout.motion.widget.Key
static int
int

Inherited methods

From androidx.constraintlayout.motion.widget.Key
int

Gets the current frame position

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

Key
setViewId(int id)

set the id of the view

Constants

KEY_TYPE

Added in 2.2.0-alpha13
public static final int KEY_TYPE = 4

SHAPE_BOUNCE

Added in 2.2.0-alpha13
public static final int SHAPE_BOUNCE = 6

SHAPE_COS_WAVE

Added in 2.2.0-alpha13
public static final int SHAPE_COS_WAVE = 5

SHAPE_REVERSE_SAW_WAVE

Added in 2.2.0-alpha13
public static final int SHAPE_REVERSE_SAW_WAVE = 4

SHAPE_SAW_WAVE

Added in 2.2.0-alpha13
public static final int SHAPE_SAW_WAVE = 3

SHAPE_SIN_WAVE

Added in 2.2.0-alpha13
public static final int SHAPE_SIN_WAVE = 0

SHAPE_SQUARE_WAVE

Added in 2.2.0-alpha13
public static final int SHAPE_SQUARE_WAVE = 1

SHAPE_TRIANGLE_WAVE

Added in 2.2.0-alpha13
public static final int SHAPE_TRIANGLE_WAVE = 2

WAVE_OFFSET

Added in 2.2.0-alpha13
public static final String WAVE_OFFSET = "waveOffset"

WAVE_PERIOD

Added in 2.2.0-alpha13
public static final String WAVE_PERIOD = "wavePeriod"

WAVE_PHASE

Added in 2.2.0-alpha13
public static final String WAVE_PHASE = "wavePhase"

WAVE_SHAPE

Added in 2.2.0-alpha13
public static final String WAVE_SHAPE = "waveShape"

Public constructors

KeyCycle

Added in 2.2.0-alpha13
public KeyCycle()

Public methods

addCycleValues

Added in 2.2.0-alpha13
public void addCycleValues(HashMap<StringViewOscillator> oscSet)

Add this key cycle to the keyCycle engines

Parameters
HashMap<StringViewOscillator> oscSet

addValues

Added in 2.2.0-alpha13
public void addValues(HashMap<StringViewSpline> splines)

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

Parameters
HashMap<StringViewSpline> splines

splines to write values to

clone

Added in 2.2.0-alpha13
public Key clone()

Clone this KeyAttributes

Returns
Key

copy

public Key copy(Key src)

Copy the key

Parameters
Key src

to be copied

Returns
Key

self

getAttributeNames

Added in 2.2.0-alpha13
public void getAttributeNames(HashSet<String> attributes)

getValue

Added in 2.2.0-alpha13
public float getValue(String key)

get the value for a given attribute of the keyCycel

Parameters
String key
Returns
float

load

Added in 2.2.0-alpha13
public void load(Context context, AttributeSet attrs)

Load the KeyCycle from xml attributes

Parameters
Context context
AttributeSet attrs

setValue

Added in 2.2.0-alpha13
public void setValue(String tag, Object value)

Set the value associated with this tag

Parameters
String tag
Object value