public class MotionKeyTrigger extends MotionKey


Summary

Constants

static final String
CROSS = "CROSS"
static final int
static final String
NEGATIVE_CROSS = "negativeCross"
static final String
POSITIVE_CROSS = "positiveCross"
static final String
POST_LAYOUT = "postLayout"
static final String
TRIGGER_COLLISION_ID = "triggerCollisionId"
static final String
TRIGGER_COLLISION_VIEW = "triggerCollisionView"
static final String
TRIGGER_ID = "triggerID"
static final String
TRIGGER_RECEIVER = "triggerReceiver"
static final String
TRIGGER_SLACK = "triggerSlack"
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 int
static final int
static final int
static final int
static final String
VIEW_TRANSITION_ON_CROSS = "viewTransitionOnCross"
static final String
VIEW_TRANSITION_ON_NEGATIVE_CROSS = "viewTransitionOnNegativeCross"
static final String
VIEW_TRANSITION_ON_POSITIVE_CROSS = "viewTransitionOnPositiveCross"

Public constructors

Public methods

void

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

MotionKey
void
conditionallyFire(float position, MotionWidget child)
MotionKeyTrigger
void
int
getId(String name)
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

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

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

CROSS

Added in 1.1.0
public static final String CROSS = "CROSS"

KEY_TYPE

Added in 1.1.0
public static final int KEY_TYPE = 5

NEGATIVE_CROSS

Added in 1.1.0
public static final String NEGATIVE_CROSS = "negativeCross"

POSITIVE_CROSS

Added in 1.1.0
public static final String POSITIVE_CROSS = "positiveCross"

POST_LAYOUT

Added in 1.1.0
public static final String POST_LAYOUT = "postLayout"

TRIGGER_COLLISION_ID

Added in 1.1.0
public static final String TRIGGER_COLLISION_ID = "triggerCollisionId"

TRIGGER_COLLISION_VIEW

Added in 1.1.0
public static final String TRIGGER_COLLISION_VIEW = "triggerCollisionView"

TRIGGER_ID

Added in 1.1.0
public static final String TRIGGER_ID = "triggerID"

TRIGGER_RECEIVER

Added in 1.1.0
public static final String TRIGGER_RECEIVER = "triggerReceiver"

TRIGGER_SLACK

Added in 1.1.0
public static final String TRIGGER_SLACK = "triggerSlack"

TYPE_CROSS

Added in 1.1.0
public static final int TYPE_CROSS = 312

TYPE_NEGATIVE_CROSS

Added in 1.1.0
public static final int TYPE_NEGATIVE_CROSS = 310

TYPE_POSITIVE_CROSS

Added in 1.1.0
public static final int TYPE_POSITIVE_CROSS = 309

TYPE_POST_LAYOUT

Added in 1.1.0
public static final int TYPE_POST_LAYOUT = 304

TYPE_TRIGGER_COLLISION_ID

Added in 1.1.0
public static final int TYPE_TRIGGER_COLLISION_ID = 307

TYPE_TRIGGER_COLLISION_VIEW

Added in 1.1.0
public static final int TYPE_TRIGGER_COLLISION_VIEW = 306

TYPE_TRIGGER_ID

Added in 1.1.0
public static final int TYPE_TRIGGER_ID = 308

TYPE_TRIGGER_RECEIVER

Added in 1.1.0
public static final int TYPE_TRIGGER_RECEIVER = 311

TYPE_TRIGGER_SLACK

Added in 1.1.0
public static final int TYPE_TRIGGER_SLACK = 305

TYPE_VIEW_TRANSITION_ON_CROSS

Added in 1.1.0
public static final int TYPE_VIEW_TRANSITION_ON_CROSS = 301

TYPE_VIEW_TRANSITION_ON_NEGATIVE_CROSS

Added in 1.1.0
public static final int TYPE_VIEW_TRANSITION_ON_NEGATIVE_CROSS = 303

TYPE_VIEW_TRANSITION_ON_POSITIVE_CROSS

Added in 1.1.0
public static final int TYPE_VIEW_TRANSITION_ON_POSITIVE_CROSS = 302

VIEW_TRANSITION_ON_CROSS

Added in 1.1.0
public static final String VIEW_TRANSITION_ON_CROSS = "viewTransitionOnCross"

VIEW_TRANSITION_ON_NEGATIVE_CROSS

Added in 1.1.0
public static final String VIEW_TRANSITION_ON_NEGATIVE_CROSS = "viewTransitionOnNegativeCross"

VIEW_TRANSITION_ON_POSITIVE_CROSS

Added in 1.1.0
public static final String VIEW_TRANSITION_ON_POSITIVE_CROSS = "viewTransitionOnPositiveCross"

Public constructors

MotionKeyTrigger

Added in 1.1.0
public MotionKeyTrigger()

Public methods

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()

conditionallyFire

Added in 1.1.0
public void conditionallyFire(float position, MotionWidget child)

copy

Added in 1.1.0
public MotionKeyTrigger copy(MotionKey src)

getAttributeNames

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

getId

Added in 1.1.0
public int getId(String name)

setValue

public boolean setValue(int type, boolean value)

Used to set boolean values

Returns
boolean

true if it accepted the 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