<Transition>
Stay organized with collections
Save and categorize content based on your preferences.
Specifies the beginning and end state of a motion sequence, the target
intermediate states, and the user interactions that trigger the motion.
Syntax
<Transition
motion:constraintSetStart="start"
motion:constraintSetEnd="end"
[ motion:duration="integer" ] >
...
</Transition>
Attributes
motion:constraintSetStart
- Initial state of the motion sequence. This can either be the ID of a
<ConstraintSet>
or a layout. To specify a <ConstraintSet>
, set this
attribute to
"@+id/constraintSetId"
. To specify a layout, set
it to "@layout/layoutState"
.
motion:constraintSetEnd
- Final state of the motion sequence. This can either be the ID of a
<ConstraintSet>
, or a layout. To specify a <ConstraintSet>
, set this
attribute to "@+id/constraintSetId"
. To specify a
layout, set it to "@layout/layoutState"
.
motion:duration
- Duration of the motion sequence in milliseconds. If not specified, the
<MotionScene>
element's defaultDuration
is used.
Can contain
<onClick>
- Indicates that the motion sequence is triggered by a user touch.
<onSwipe>
- Indicates that the motion sequence is triggered by a user swipe.
<KeyFrameSet>
- Specifies one or more intermediate positions or attribute settings for
elements in the motion sequence.
Contained in
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2023-02-27 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "Last updated 2023-02-27 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-02-27 UTC."]]