MotionScene.Transition


class MotionScene.Transition


Transition defines the interaction from one state to another. With out a Transition object Transition between two stats involves strictly linear interpolation

Summary

Public constructors

Transition(
    id: Int,
    motionScene: MotionScene!,
    constraintSetStartId: Int,
    constraintSetEndId: Int
)

Create a transition

Public functions

Unit
addKeyFrame(keyFrames: KeyFrames!)

add a keyframe to this motion scene

Unit
addOnClick(context: Context!, parser: XmlPullParser!)

Add on Click support using the xml parser

Unit
addOnClick(id: Int, action: Int)

Add the onclick to this view

String!
debugString(context: Context!)

Print a debug string indicating the starting and ending state of the transition

Int

return the autoTransitionType. one of AUTO_NONE, AUTO_JUMP_TO_START, AUTO_JUMP_TO_END, AUTO_ANIMATE_TO_START, AUTO_ANIMATE_TO_END

Int

gets the default transition duration

Int

Get the id of the constraint set to go to

Int

Transitions can be given and ID.

(Mutable)List<KeyFrames!>!
Int

get the mode of layout during transition

(Mutable)List<MotionScene.Transition.TransitionOnClick!>!

Get the onClick handlers.

Int

gets the pathMotionArc for the all motions in this transition. if set to UNSET (default) it reverts to the setting of the constraintSet

Float

Gets the stagger value.

Int

Gets the id of the starting constraint set

TouchResponse!

Get the Touch response manager

Boolean

Returns true if this Transition can be auto considered for transition Default is enabled

Boolean

is the transition flag set

Unit

Remove the onclick added to this view

Unit

sets the autoTransitionType On reaching a state auto transitions may be run based on one of AUTO_NONE, AUTO_JUMP_TO_START, AUTO_JUMP_TO_END, AUTO_ANIMATE_TO_START, AUTO_ANIMATE_TO_END

Unit
setDuration(duration: Int)

sets the duration of the transition if set to <8 it will be set to 8

Unit

enable or disable the Transition.

Unit
setInterpolatorInfo(
    interpolator: Int,
    interpolatorString: String!,
    interpolatorID: Int
)

Sets the interpolation used for this transition.

Unit

set the mode of layout during transition

Unit
setOnSwipe(onSwipe: OnSwipe!)

Set the onSwipe for this Transition

Unit
setOnTouchUp(touchUpMode: Int)

Set the on touch up mode

Unit

Sets the pathMotionArc for the all motions in this transition. if set to UNSET (default) it reverts to the setting of the constraintSet

Unit
setStagger(stagger: Float)

Sets the stagger value.

Unit

Constants

AUTO_ANIMATE_TO_END

Added in 2.2.0
const val AUTO_ANIMATE_TO_END = 4: Int

AUTO_ANIMATE_TO_START

Added in 2.2.0
const val AUTO_ANIMATE_TO_START = 3: Int

AUTO_JUMP_TO_END

Added in 2.2.0
const val AUTO_JUMP_TO_END = 2: Int

AUTO_JUMP_TO_START

Added in 2.2.0
const val AUTO_JUMP_TO_START = 1: Int

AUTO_NONE

Added in 2.2.0
const val AUTO_NONE = 0: Int

INTERPOLATE_ANTICIPATE

Added in 2.2.0
const val INTERPOLATE_ANTICIPATE = 6: Int

INTERPOLATE_BOUNCE

Added in 2.2.0
const val INTERPOLATE_BOUNCE = 4: Int

INTERPOLATE_EASE_IN

Added in 2.2.0
const val INTERPOLATE_EASE_IN = 1: Int

INTERPOLATE_EASE_IN_OUT

Added in 2.2.0
const val INTERPOLATE_EASE_IN_OUT = 0: Int

INTERPOLATE_EASE_OUT

Added in 2.2.0
const val INTERPOLATE_EASE_OUT = 2: Int

INTERPOLATE_LINEAR

Added in 2.2.0
const val INTERPOLATE_LINEAR = 3: Int

INTERPOLATE_OVERSHOOT

Added in 2.2.0
const val INTERPOLATE_OVERSHOOT = 5: Int

INTERPOLATE_REFERENCE_ID

Added in 2.2.0
const val INTERPOLATE_REFERENCE_ID = -2: Int

INTERPOLATE_SPLINE_STRING

Added in 2.2.0
const val INTERPOLATE_SPLINE_STRING = -1: Int

Public constructors

Transition

Added in 2.2.0
Transition(
    id: Int,
    motionScene: MotionScene!,
    constraintSetStartId: Int,
    constraintSetEndId: Int
)

Create a transition

Parameters
id: Int

a unique id to represent the transition.

motionScene: MotionScene!

the motion scene that the transition will be added to.

constraintSetStartId: Int

id of the ConstraintSet to be used for the start of transition

constraintSetEndId: Int

id of the ConstraintSet to be used for the end of transition

Public functions

addKeyFrame

Added in 2.2.0
fun addKeyFrame(keyFrames: KeyFrames!): Unit

add a keyframe to this motion scene

Parameters
keyFrames: KeyFrames!

addOnClick

Added in 2.2.0
fun addOnClick(context: Context!, parser: XmlPullParser!): Unit

Add on Click support using the xml parser

Parameters
context: Context!
parser: XmlPullParser!

addOnClick

Added in 2.2.0
fun addOnClick(id: Int, action: Int): Unit

Add the onclick to this view

Parameters
id: Int
action: Int

debugString

Added in 2.2.0
fun debugString(context: Context!): String!

Print a debug string indicating the starting and ending state of the transition

Parameters
context: Context!
Returns
String!

getAutoTransition

Added in 2.2.0
fun getAutoTransition(): Int

return the autoTransitionType. one of AUTO_NONE, AUTO_JUMP_TO_START, AUTO_JUMP_TO_END, AUTO_ANIMATE_TO_START, AUTO_ANIMATE_TO_END

Returns
Int

0=NONE, 1=JUMP_TO_START, 2=JUMP_TO_END, 3=ANIMATE_TO_START, 4=ANIMATE_TO_END

getDuration

Added in 2.2.0
fun getDuration(): Int

gets the default transition duration

Returns
Int

duration int milliseconds

getEndConstraintSetId

Added in 2.2.0
fun getEndConstraintSetId(): Int

Get the id of the constraint set to go to

Returns
Int

getId

Added in 2.2.0
fun getId(): Int

Transitions can be given and ID. If unset it returns UNSET (-1)

Returns
Int

The Id of the Transition set in the MotionScene File or UNSET (-1)

getKeyFrameList

Added in 2.2.0
fun getKeyFrameList(): (Mutable)List<KeyFrames!>!

getLayoutDuringTransition

Added in 2.2.0
fun getLayoutDuringTransition(): Int

get the mode of layout during transition

Returns
Int

getOnClickList

Added in 2.2.0
fun getOnClickList(): (Mutable)List<MotionScene.Transition.TransitionOnClick!>!

Get the onClick handlers.

Returns
(Mutable)List<MotionScene.Transition.TransitionOnClick!>!

list of on click handler

getPathMotionArc

Added in 2.2.0
fun getPathMotionArc(): Int

gets the pathMotionArc for the all motions in this transition. if set to UNSET (default) it reverts to the setting of the constraintSet

Returns
Int

arcMode

getStagger

Added in 2.2.0
fun getStagger(): Float

Gets the stagger value.

Returns
Float

getStartConstraintSetId

Added in 2.2.0
fun getStartConstraintSetId(): Int

Gets the id of the starting constraint set

Returns
Int

getTouchResponse

Added in 2.2.0
fun getTouchResponse(): TouchResponse!

Get the Touch response manager

Returns
TouchResponse!

isEnabled

Added in 2.2.0
fun isEnabled(): Boolean

Returns true if this Transition can be auto considered for transition Default is enabled

isTransitionFlag

Added in 2.2.0
fun isTransitionFlag(flag: Int): Boolean

is the transition flag set

Parameters
flag: Int
Returns
Boolean

removeOnClick

Added in 2.2.0
fun removeOnClick(id: Int): Unit

Remove the onclick added to this view

Parameters
id: Int

setAutoTransition

Added in 2.2.0
fun setAutoTransition(type: Int): Unit

sets the autoTransitionType On reaching a state auto transitions may be run based on one of AUTO_NONE, AUTO_JUMP_TO_START, AUTO_JUMP_TO_END, AUTO_ANIMATE_TO_START, AUTO_ANIMATE_TO_END

Parameters
type: Int

setDuration

Added in 2.2.0
fun setDuration(duration: Int): Unit

sets the duration of the transition if set to <8 it will be set to 8

Parameters
duration: Int

in milliseconds (min is 8)

setEnabled

Added in 2.2.0
fun setEnabled(enable: Boolean): Unit

enable or disable the Transition. If a Transition is disabled it is not eligible for automatically switching to.

Parameters
enable: Boolean

setInterpolatorInfo

Added in 2.2.0
fun setInterpolatorInfo(
    interpolator: Int,
    interpolatorString: String!,
    interpolatorID: Int
): Unit

Sets the interpolation used for this transition. The call support standard types EASE_IN_OUT etc.: setInterpolatorInfo(MotionScene.Transition.INTERPOLATE_EASE_IN_OUT, null, 0); setInterpolatorInfo(MotionScene.Transition.INTERPOLATE_OVERSHOOT, null, 0); Strings such as "cubic(...)" , "spline(...)" setInterpolatorInfo( MotionScene.Transition.INTERPOLATE_SPLINE_STRING, "cubic(1,0,0,1)", 0); Android interpolators in res/anim : setInterpolatorInfo( MotionScene.Transition.INTERPOLATE_REFERENCE_ID, null, R.anim....);

Parameters
interpolator: Int

sets the type of interpolation (MotionScene.Transition.INTERPOLATE_*)

interpolatorString: String!

sets a string based custom interpolation

interpolatorID: Int

sets the id of a Android Transition

setLayoutDuringTransition

Added in 2.2.0
fun setLayoutDuringTransition(mode: Int): Unit

set the mode of layout during transition

Parameters
mode: Int

setOnSwipe

Added in 2.2.0
fun setOnSwipe(onSwipe: OnSwipe!): Unit

Set the onSwipe for this Transition

Parameters
onSwipe: OnSwipe!

setOnTouchUp

Added in 2.2.0
fun setOnTouchUp(touchUpMode: Int): Unit

Set the on touch up mode

Parameters
touchUpMode: Int

setPathMotionArc

Added in 2.2.0
fun setPathMotionArc(arcMode: Int): Unit

Sets the pathMotionArc for the all motions in this transition. if set to UNSET (default) it reverts to the setting of the constraintSet

Parameters
arcMode: Int

setStagger

Added in 2.2.0
fun setStagger(stagger: Float): Unit

Sets the stagger value. A Stagger value of zero means no stagger. A Stagger value of 1 means the last view starts moving at .5 progress

Parameters
stagger: Float

setTransitionFlag

Added in 2.2.0
fun setTransitionFlag(flag: Int): Unit