Root element of a motion scene file. The
contains one or more
elements, each of which defines the start and end state of a motion sequence and
the transition between the two.
Syntax
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:android="http://schemas.android.com/apk/res/android"> ...
Must contain
- Specifies the motion sequence to perform. If the
contains multiple
elements, theMotionLayout
chooses the most appropriate
based on the user's interaction. For example, a
might have four
children, each with an
for a user swipe in a different direction. When the user swipes on the screen, theMotionLayout
uses the appropriate
for a swipe in that direction.
Can contain
- Specifies a beginning or ending state for one or more of the
nodes. The
is not permitted to have
children, since the
can point to XML layouts instead of pointing to constraint sets.
Attributes
defaultDuration
- Default duration for all transitions in milliseconds. The default duration is
used for motion sequences that don't specify their own duration. For example,
if you set
defaultDuration="300"
, all motion sequences default to 300 milliseconds in length if they don't explicitly specify their own duration.