<מעבר>
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מציין את מצב ההתחלה והסיום של רצף תנועה, היעד
במצבי הביניים, והאינטראקציות של המשתמשים שגורמות לתנועה.
תחביר
<Transition
motion:constraintSetStart="start"
motion:constraintSetEnd="end"
[ motion:duration="integer" ] >
...
</Transition>
מאפיינים
motion:constraintSetStart
- המצב הראשוני של רצף התנועה. המזהה הזה יכול להיות
<ConstraintSet>
או פריסה. כדי לציין <ConstraintSet>
, צריך להגדיר
לשייך אל
"@+id/constraintSetId"
. כדי לציין פריסה, צריך להגדיר
אותו ל"@layout/layoutState"
.
motion:constraintSetEnd
- המצב הסופי של רצף התנועה. המזהה הזה יכול להיות
<ConstraintSet>
או פריסה. כדי לציין <ConstraintSet>
, צריך להגדיר
ל-"@+id/constraintSetId"
. כדי לציין
והגדרה כ-"@layout/layoutState"
.
motion:duration
- משך הזמן של רצף התנועה באלפיות השנייה. אם לא צוין אחרת,
<MotionScene>
נעשה שימוש ב-defaultDuration
של הרכיב.
יכול להכיל
<onClick>
- מציין שרצף התנועה מופעל על ידי נגיעה של המשתמש.
<onSwipe>
- מציין שרצף התנועה מופעל על ידי החלקה של המשתמש.
<KeyFrameSet>
- ציון מיקום ביניים אחד או יותר או הגדרות מאפיינים של
ברצף התנועה.
בתוך
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. 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)"]]