<移行>
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
モーション シーケンスの開始状態と終了状態、ターゲット
中間状態、動作をトリガーしたユーザー操作などです。
構文
<Transition
motion:constraintSetStart="start"
motion:constraintSetEnd="end"
[ motion:duration="integer" ] >
...
</Transition>
属性
motion:constraintSetStart
- モーション シーケンスの初期状態。アプリケーションの ID か、
<ConstraintSet>
配置できます<ConstraintSet>
を指定するには、
属性に
"@+id/constraintSetId"
。レイアウトを指定するには、
"@layout/layoutState"
に設定します。
motion:constraintSetEnd
- モーション シーケンスの最終状態。アプリケーションの ID か、
<ConstraintSet>
、またはレイアウトです。<ConstraintSet>
を指定するには、
"@+id/constraintSetId"
に指定します。特定の
"@layout/layoutState"
に設定します。
motion:duration
- モーション シーケンスの継続時間(ミリ秒単位)。指定しない場合、
<MotionScene>
要素の defaultDuration
が使用されます。
任意の子要素
<onClick>
- ユーザーのタップによってモーション シーケンスがトリガーされることを示します。
<onSwipe>
- ユーザーによるスワイプによってモーション シーケンスがトリガーされることを示します。
<KeyFrameSet>
- 中間位置または属性設定を 1 つ以上指定します。
複数の要素が 1 つ含まれています。
親要素
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2025-07-27 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-27 UTC。"],[],[],null,["# <Transition>\n\nSpecifies the beginning and end state of a motion sequence, the target\nintermediate states, and the user interactions that trigger the motion.\n\nSyntax\n------\n\n```xml\n\u003cTransition\n motion:constraintSetStart=\"start\"\n motion:constraintSetEnd=\"end\"\n [ motion:duration=\"integer\" ] \u003e\n ...\n\u003c/Transition\u003e\n```\n\nAttributes\n----------\n\n`motion:constraintSetStart`\n: Initial state of the motion sequence. This can either be the ID of a\n [`\u003cConstraintSet\u003e`](/training/constraint-layout/motionlayout/ref/constraintset)\n or a layout. To specify a `\u003cConstraintSet\u003e`, set this\n attribute to\n `\"@+id/`\u003cvar translate=\"no\"\u003econstraintSetId\u003c/var\u003e`\"`. To specify a layout, set\n it to `\"@layout/`\u003cvar translate=\"no\"\u003elayoutState\u003c/var\u003e`\"`.\n\n`motion:constraintSetEnd`\n: Final state of the motion sequence. This can either be the ID of a\n `\u003cConstraintSet\u003e`, or a layout. To specify a `\u003cConstraintSet\u003e`, set this\n attribute to `\"@+id/`\u003cvar translate=\"no\"\u003econstraintSetId\u003c/var\u003e`\"`. To specify a\n layout, set it to `\"@layout/`\u003cvar translate=\"no\"\u003elayoutState\u003c/var\u003e`\"`.\n\n`motion:duration`\n: Duration of the motion sequence in milliseconds. If not specified, the\n [`\u003cMotionScene\u003e`](/training/constraint-layout/motionlayout/ref/motionscene)\n element's `defaultDuration` is used.\n\nCan contain\n-----------\n\n[`\u003conClick\u003e`](/training/constraint-layout/motionlayout/ref/onclick)\n: Indicates that the motion sequence is triggered by a user touch.\n\n[`\u003conSwipe\u003e`](/training/constraint-layout/motionlayout/ref/onswipe)\n: Indicates that the motion sequence is triggered by a user swipe.\n\n[`\u003cKeyFrameSet\u003e`](/training/constraint-layout/motionlayout/ref/keyframeset)\n: Specifies one or more intermediate positions or attribute settings for\n elements in the motion sequence.\n\nContained in\n------------\n\n- [`\u003cMotionScene\u003e`](/training/constraint-layout/motionlayout/ref/motionscene)"]]