public abstract class MotionKey implements TypedValues


Base class in an element in a KeyFrame

Summary

Constants

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"

Public fields

static int
HashMap<StringCustomVariable>
int
int

Public constructors

Public methods

abstract void

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

abstract MotionKey
MotionKey
abstract void
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

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

MotionKey
setViewId(int id)

Inherited Constants

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.utils.TypedValues
abstract int
getId(String name)

Constants

ALPHA

Added in 1.1.0-alpha13
public static final String ALPHA = "alpha"

CUSTOM

Added in 1.1.0-alpha13
public static final String CUSTOM = "CUSTOM"

ELEVATION

Added in 1.1.0-alpha13
public static final String ELEVATION = "elevation"

ROTATION

Added in 1.1.0-alpha13
public static final String ROTATION = "rotationZ"

ROTATION_X

Added in 1.1.0-alpha13
public static final String ROTATION_X = "rotationX"

SCALE_X

Added in 1.1.0-alpha13
public static final String SCALE_X = "scaleX"

SCALE_Y

Added in 1.1.0-alpha13
public static final String SCALE_Y = "scaleY"

TRANSITION_PATH_ROTATE

Added in 1.1.0-alpha13
public static final String TRANSITION_PATH_ROTATE = "transitionPathRotate"

TRANSLATION_X

Added in 1.1.0-alpha13
public static final String TRANSLATION_X = "translationX"

TRANSLATION_Y

Added in 1.1.0-alpha13
public static final String TRANSLATION_Y = "translationY"

VISIBILITY

Added in 1.1.0-alpha13
public static final String VISIBILITY = "visibility"

Public fields

UNSET

Added in 1.1.0-alpha13
public static int UNSET

mCustom

Added in 1.1.0-alpha13
public HashMap<StringCustomVariablemCustom

mFramePosition

Added in 1.1.0-alpha13
public int mFramePosition

mType

Added in 1.1.0-alpha13
public int mType

Public constructors

MotionKey

Added in 1.1.0-alpha13
public MotionKey()

Public methods

addValues

Added in 1.1.0-alpha13
public abstract 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-alpha13
public abstract MotionKey clone()

copy

Added in 1.1.0-alpha13
public MotionKey copy(MotionKey src)

getAttributeNames

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

getFramePosition

Added in 1.1.0-alpha13
public int getFramePosition()

Gets the current frame position

setCustomAttribute

Added in 1.1.0-alpha13
public void setCustomAttribute(String name, int type, boolean value)

setCustomAttribute

Added in 1.1.0-alpha13
public void setCustomAttribute(String name, int type, float value)

setCustomAttribute

Added in 1.1.0-alpha13
public void setCustomAttribute(String name, int type, int value)

setCustomAttribute

Added in 1.1.0-alpha13
public void setCustomAttribute(String name, int type, String value)

setFramePosition

Added in 1.1.0-alpha13
public void setFramePosition(int pos)

sets the frame position

setInterpolation

Added in 1.1.0-alpha13
public void setInterpolation(HashMap<StringInteger> interpolation)

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

setValue

Added in 1.1.0-alpha13
public boolean setValue(int type, boolean value)

Used to set boolean values

Returns
boolean

true if it accepted the value

setValue

Added in 1.1.0-alpha13
public boolean setValue(int type, float value)

Used to set float values

Returns
boolean

true if it accepted the value

setValue

Added in 1.1.0-alpha13
public boolean setValue(int type, int value)

Used to set integer values

Returns
boolean

true if it accepted the value

setValue

Added in 1.1.0-alpha13
public boolean setValue(int type, String value)

Used to set String values

Returns
boolean

true if it accepted the value

setViewId

Added in 1.1.0-alpha13
public MotionKey setViewId(int id)