<Transition>

Stay organized with collections Save and categorize content based on your preferences.

Specifies the beginning and end state of the motion sequence, any desired 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 may 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 to “@layout/layoutState.
motion:constraintSetEnd
Final state of the motion sequence. This may 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 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