public class MotionKeyPosition extends MotionKey


Summary

Constants

static final float
static final int
static final int
static final int

Public constructors

Public methods

void
MotionKey
MotionKey
void
int
getId(String name)
boolean
intersects(
    int layoutWidth,
    int layoutHeight,
    FloatRect start,
    FloatRect end,
    float x,
    float y
)
void
positionAttributes(
    MotionWidget view,
    FloatRect start,
    FloatRect end,
    float x,
    float y,
    String[] attribute,
    float[] value
)
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
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

SELECTION_SLOPE

Added in 1.1.0-alpha13
protected static final float SELECTION_SLOPE = 20.0f

TYPE_CARTESIAN

Added in 1.1.0-alpha13
public static final int TYPE_CARTESIAN = 0

TYPE_PATH

Added in 1.1.0-alpha13
public static final int TYPE_PATH = 1

TYPE_SCREEN

Added in 1.1.0-alpha13
public static final int TYPE_SCREEN = 2

Public fields

mAltPercentX

Added in 1.1.0-alpha13
public float mAltPercentX

mAltPercentY

Added in 1.1.0-alpha13
public float mAltPercentY

mCurveFit

Added in 1.1.0-alpha13
public int mCurveFit

mDrawPath

Added in 1.1.0-alpha13
public int mDrawPath

mPathMotionArc

Added in 1.1.0-alpha13
public int mPathMotionArc

mPercentHeight

Added in 1.1.0-alpha13
public float mPercentHeight

mPercentWidth

Added in 1.1.0-alpha13
public float mPercentWidth

mPercentX

Added in 1.1.0-alpha13
public float mPercentX

mPercentY

Added in 1.1.0-alpha13
public float mPercentY

mPositionType

Added in 1.1.0-alpha13
public int mPositionType

mTransitionEasing

Added in 1.1.0-alpha13
public String mTransitionEasing

Public constructors

MotionKeyPosition

Added in 1.1.0-alpha13
public MotionKeyPosition()

Public methods

addValues

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

splines to write values to

clone

Added in 1.1.0-alpha13
public MotionKey clone()

copy

public MotionKey copy(MotionKey src)

getAttributeNames

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

getId

Added in 1.1.0-alpha13
public int getId(String name)

intersects

Added in 1.1.0-alpha13
public boolean intersects(
    int layoutWidth,
    int layoutHeight,
    FloatRect start,
    FloatRect end,
    float x,
    float y
)

positionAttributes

Added in 1.1.0-alpha13
public void positionAttributes(
    MotionWidget view,
    FloatRect start,
    FloatRect end,
    float x,
    float y,
    String[] attribute,
    float[] value
)

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