class KeyTrigger : Key


Defines container for a key frame of for storing KeyAttributes. KeyAttributes change post layout values of a view.

Summary

Constants

const String!
CROSS = "CROSS"
const Int
const String!
NEGATIVE_CROSS = "negativeCross"
const String!
POSITIVE_CROSS = "positiveCross"
const String!
POST_LAYOUT = "postLayout"
const String!
TRIGGER_COLLISION_ID = "triggerCollisionId"
const String!
TRIGGER_COLLISION_VIEW = "triggerCollisionView"
const String!
TRIGGER_ID = "triggerID"
const String!
TRIGGER_RECEIVER = "triggerReceiver"
const String!
TRIGGER_SLACK = "triggerSlack"
const String!
VIEW_TRANSITION_ON_CROSS = "viewTransitionOnCross"
const String!
VIEW_TRANSITION_ON_NEGATIVE_CROSS = "viewTransitionOnNegativeCross"
const String!
VIEW_TRANSITION_ON_POSITIVE_CROSS = "viewTransitionOnPositiveCross"

Public constructors

Public functions

Unit

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

Key!

Clone this KeyAttributes

Unit
conditionallyFire(pos: Float, child: View!)

This fires the keyTriggers associated with this view at that position

Key!
copy(src: Key!)

Copy the key

Unit
Unit
load(context: Context!, attrs: AttributeSet!)
Unit
setValue(tag: String!, value: Any!)

Set the value associated with this tag

Inherited Constants

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

Inherited functions

From androidx.constraintlayout.motion.widget.Key
Int

Gets the current frame position

Unit

sets the frame position

Unit
setInterpolation(interpolation: HashMap<String!, Int!>!)

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!

set the id of the view

Inherited properties

From androidx.constraintlayout.motion.widget.Key
java-static Int
Int

Constants

CROSS

Added in 2.2.0-alpha13
const val CROSS = "CROSS": String!

KEY_TYPE

Added in 2.2.0-alpha13
const val KEY_TYPE = 5: Int

NEGATIVE_CROSS

Added in 2.2.0-alpha13
const val NEGATIVE_CROSS = "negativeCross": String!

POSITIVE_CROSS

Added in 2.2.0-alpha13
const val POSITIVE_CROSS = "positiveCross": String!

POST_LAYOUT

Added in 2.2.0-alpha13
const val POST_LAYOUT = "postLayout": String!

TRIGGER_COLLISION_ID

Added in 2.2.0-alpha13
const val TRIGGER_COLLISION_ID = "triggerCollisionId": String!

TRIGGER_COLLISION_VIEW

Added in 2.2.0-alpha13
const val TRIGGER_COLLISION_VIEW = "triggerCollisionView": String!

TRIGGER_ID

Added in 2.2.0-alpha13
const val TRIGGER_ID = "triggerID": String!

TRIGGER_RECEIVER

Added in 2.2.0-alpha13
const val TRIGGER_RECEIVER = "triggerReceiver": String!

TRIGGER_SLACK

Added in 2.2.0-alpha13
const val TRIGGER_SLACK = "triggerSlack": String!

VIEW_TRANSITION_ON_CROSS

Added in 2.2.0-alpha13
const val VIEW_TRANSITION_ON_CROSS = "viewTransitionOnCross": String!

VIEW_TRANSITION_ON_NEGATIVE_CROSS

Added in 2.2.0-alpha13
const val VIEW_TRANSITION_ON_NEGATIVE_CROSS = "viewTransitionOnNegativeCross": String!

VIEW_TRANSITION_ON_POSITIVE_CROSS

Added in 2.2.0-alpha13
const val VIEW_TRANSITION_ON_POSITIVE_CROSS = "viewTransitionOnPositiveCross": String!

Public constructors

KeyTrigger

Added in 2.2.0-alpha13
KeyTrigger()

Public functions

addValues

Added in 2.2.0-alpha13
fun addValues(splines: HashMap<String!, ViewSpline!>!): Unit

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

Parameters
splines: HashMap<String!, ViewSpline!>!

splines to write values to

clone

Added in 2.2.0-alpha13
fun clone(): Key!

Clone this KeyAttributes

Returns
Key!

conditionallyFire

Added in 2.2.0-alpha13
fun conditionallyFire(pos: Float, child: View!): Unit

This fires the keyTriggers associated with this view at that position

Parameters
pos: Float

the progress

child: View!

the view

copy

fun copy(src: Key!): Key!

Copy the key

Parameters
src: Key!

to be copied

Returns
Key!

self

getAttributeNames

Added in 2.2.0-alpha13
fun getAttributeNames(attributes: HashSet<String!>!): Unit

load

Added in 2.2.0-alpha13
fun load(context: Context!, attrs: AttributeSet!): Unit

setValue

Added in 2.2.0-alpha13
fun setValue(tag: String!, value: Any!): Unit

Set the value associated with this tag

Parameters
tag: String!
value: Any!