Transition
class Transition : TypedValues
Summary
Nested types |
|---|
class Transition.WidgetState |
Public constructors |
|---|
Transition(dpToPixel: CorePixelDp) |
Public functions |
|
|---|---|
Unit |
addCustomColor(state: Int, widgetId: String!, property: String!, color: Int) |
Unit |
addCustomFloat(state: Int, widgetId: String!, property: String!, value: Float) |
Unit |
addKeyAttribute(target: String!, bundle: TypedBundle!) |
Unit |
addKeyAttribute(Add a key attribute and the custom variables into the |
Unit |
addKeyCycle(target: String!, bundle: TypedBundle!) |
Unit |
addKeyPosition(target: String!, bundle: TypedBundle!) |
Unit |
|
Unit |
|
Unit |
clear() |
Boolean |
|
Float |
Converts from xy drag to progress This should be used till touch up |
Unit |
fillKeyPositions( |
Transition.KeyPosition! |
findNextPosition(target: String!, frameNumber: Int) |
Transition.KeyPosition! |
findPreviousPosition(target: String!, frameNumber: Int) |
Int |
This gets the auto transition mode being used |
WidgetFrame! |
getEnd(child: ConstraintWidget!)Used in debug draw |
WidgetFrame! |
|
Int |
|
WidgetFrame! |
getInterpolated(child: ConstraintWidget!)Used after the interpolation |
WidgetFrame! |
getInterpolated(id: String!) |
Int |
|
Int |
|
Interpolator! |
This gets the interpolator being used |
java-static Interpolator! |
getInterpolator(interpolator: Int, interpolatorString: String!)get the interpolater based on a constant or a string |
Int |
getKeyFrames( |
Motion! |
|
Int |
getNumberKeyPositions(frame: WidgetFrame!) |
Array<Float>! |
|
WidgetFrame! |
getStart(child: ConstraintWidget!)Used in debug draw |
WidgetFrame! |
|
Float |
getTouchUpProgress(currentTime: Long)get the current touch up progress current time in nanoseconds (ideally coming from an animation clock) |
Transition.WidgetState! |
getWidgetState( |
Boolean |
|
Boolean |
|
Unit |
interpolate(parentWidth: Int, parentHeight: Int, progress: Float) |
Boolean |
isEmpty() |
Boolean |
isTouchNotDone(currentProgress: Float)Are we still animating |
Unit |
setTouchUp(Set the start of the touch up |
Unit |
setTransitionProperties(bundle: TypedBundle!) |
Boolean |
Used to set boolean values |
Boolean |
Used to set float values |
Boolean |
Used to set integer values |
Boolean |
Used to set String values |
Unit |
updateFrom(container: ConstraintWidgetContainer!, state: Int)Update container of parameters for the state |
Inherited Constants |
||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Constants
Public constructors
Public functions
addCustomColor
fun addCustomColor(state: Int, widgetId: String!, property: String!, color: Int): Unit
addCustomFloat
fun addCustomFloat(state: Int, widgetId: String!, property: String!, value: Float): Unit
addKeyAttribute
fun addKeyAttribute(
target: String!,
bundle: TypedBundle!,
custom: Array<CustomVariable!>!
): Unit
Add a key attribute and the custom variables into the
| Parameters | |
|---|---|
target: String! |
the id of the target |
bundle: TypedBundle! |
the key attributes bundle containing position etc. |
custom: Array<CustomVariable!>! |
the customVariables to add at that position |
addKeyPosition
fun addKeyPosition(target: String!, frame: Int, type: Int, x: Float, y: Float): Unit
dragToProgress
fun dragToProgress(
currentProgress: Float,
baseW: Int,
baseH: Int,
dx: Float,
dy: Float
): Float
Converts from xy drag to progress This should be used till touch up
| Parameters | |
|---|---|
baseW: Int |
parent width |
baseH: Int |
parent height |
dx: Float |
change in x |
dy: Float |
change in y |
| Returns | |
|---|---|
Float |
the change in progress |
fillKeyPositions
fun fillKeyPositions(
frame: WidgetFrame!,
x: FloatArray<Float>!,
y: FloatArray<Float>!,
pos: FloatArray<Float>!
): Unit
findNextPosition
fun findNextPosition(target: String!, frameNumber: Int): Transition.KeyPosition!
findPreviousPosition
fun findPreviousPosition(target: String!, frameNumber: Int): Transition.KeyPosition!
getAutoTransition
fun getAutoTransition(): Int
This gets the auto transition mode being used
getInterpolated
fun getInterpolated(child: ConstraintWidget!): WidgetFrame!
Used after the interpolation
getInterpolator
fun getInterpolator(): Interpolator!
This gets the interpolator being used
getInterpolator
java-static fun getInterpolator(interpolator: Int, interpolatorString: String!): Interpolator!
get the interpolater based on a constant or a string
getKeyFrames
fun getKeyFrames(
id: String!,
rectangles: FloatArray<Float>!,
pathMode: IntArray<Int>!,
position: IntArray<Int>!
): Int
getTouchUpProgress
fun getTouchUpProgress(currentTime: Long): Float
get the current touch up progress current time in nanoseconds (ideally coming from an animation clock)
| Parameters | |
|---|---|
currentTime: Long |
in nanoseconds |
| Returns | |
|---|---|
Float |
progress |
getWidgetState
fun getWidgetState(
widgetId: String!,
child: ConstraintWidget!,
transitionState: Int
): Transition.WidgetState!
interpolate
fun interpolate(parentWidth: Int, parentHeight: Int, progress: Float): Unit
isTouchNotDone
fun isTouchNotDone(currentProgress: Float): Boolean
Are we still animating
| Parameters | |
|---|---|
currentProgress: Float |
motion progress |
| Returns | |
|---|---|
Boolean |
true to continue moving |
setTouchUp
fun setTouchUp(
currentProgress: Float,
currentTime: Long,
velocityX: Float,
velocityY: Float
): Unit
Set the start of the touch up
setValue
fun setValue(id: Int, value: Boolean): Boolean
Used to set boolean values
| Returns | |
|---|---|
Boolean |
true if it accepted the value |
setValue
fun setValue(id: Int, value: Float): Boolean
Used to set float values
| Returns | |
|---|---|
Boolean |
true if it accepted the value |
setValue
fun setValue(id: Int, value: Int): Boolean
Used to set integer values
| Returns | |
|---|---|
Boolean |
true if it accepted the value |
setValue
fun setValue(id: Int, value: String!): Boolean
Used to set String values
| Returns | |
|---|---|
Boolean |
true if it accepted the value |
updateFrom
fun updateFrom(container: ConstraintWidgetContainer!, state: Int): Unit
Update container of parameters for the state
| Parameters | |
|---|---|
container: ConstraintWidgetContainer! |
contains all the widget parameters |
state: Int |
starting or ending |