תצוגה מקדימה של האנימציה
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
ב-Android Studio אפשר לבדוק אנימציות מתוך Animation Preview (תצוגה מקדימה של אנימציה). אם הנפשה מתוארת בתצוגה מקדימה של קומפוזיציה, אפשר לבדוק את הערך המדויק של כל ערך מונפש בזמן נתון, להשהות את ההנפשה, להפעיל אותה בלולאה, להריץ אותה קדימה או להאט אותה, כדי לעזור לכם לנפות באגים בהנפשה לאורך המעברים שלה:

אפשר גם להשתמש בתצוגה מקדימה של אנימציה כדי ליצור תרשים של עקומות אנימציה. זה שימושי כדי לוודא שערכי האנימציה מסונכרנים בצורה נכונה:

הכלי Animation Preview מזהה באופן אוטומטי אנימציות שאפשר לבדוק, שמסומנות בסמל Start Animation Preview
.

אם יש לכם כמה אנימציות, אתם יכולים להשתמש בתצוגה המקדימה של האנימציה כדי לבדוק ולתאם את כולן בבת אחת. אפשר גם להקפיא אנימציה ספציפית.

אפשר להשתמש בבוחרים כדי להגדיר מצבים לא מספריים או בוליאניים, וכך לנפות באגים באנימציה של Compose באמצעות קלט מדויק. בכל ממשקי Compose Animation API הנתמכים, אפשר להפעיל, להשהות, להריץ קדימה ואחורה, לשלוט במהירות ולתאם.

התצוגה המקדימה של אנימציה תומכת כרגע בממשקי ה-API updateTransition
, AnimatedVisibility
, animate*AsState
, CrossFade
, rememberInfiniteTransition
ו-AnimatedContent
. כדי לגשת לתכונות החדשות ביותר, צריך להשתמש בתצוגה מקדימה של אנימציה עם Android Studio Narwhal Feature Drop ועם גרסה compose.animation
1.9.0 ואילך.
מומלץ בשבילך
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. Java ו-OpenJDK הם סימנים מסחריים או סימנים מסחריים רשומים של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-08-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-08-27 (שעון UTC)."],[],[],null,["# Animation Preview\n\nAndroid Studio allows you to inspect animations from Animation Preview. If an\nanimation is described in a composable preview, you can inspect the exact value\nof each animated value at a given time, pause the animation, loop it,\nfast-forward it, or slow it, to help you debug the animation throughout its\ntransitions:\n\nYou can also use Animation Preview to graph visualize animation curves, which is\nuseful for making sure that the animation values are choreographed properly:\n\nAnimation Preview automatically detects inspectable animations, which are\nindicated by the **Start Animation Preview** icon\n.\n\nIf you have multiple animations, you can use Animation Preview to inspect and\ncoordinate them all at once. You can also freeze a specific animation.\n\nUse pickers to set non-enum or boolean states to debug your Compose animation\nusing precise inputs. For all supported Compose Animation APIs, you can play,\npause, scrub, control speed, and coordinate.\n\nAnimation Preview currently supports the\n[`updateTransition`](/reference/kotlin/androidx/compose/animation/core/package-summary#updateTransition(kotlin.Any,kotlin.String)),\n[`AnimatedVisibility`](/reference/kotlin/androidx/compose/animation/package-summary#AnimatedVisibility(androidx.compose.animation.core.MutableTransitionState,androidx.compose.ui.Modifier,androidx.compose.animation.EnterTransition,androidx.compose.animation.ExitTransition,kotlin.String,kotlin.Function1)),\n[`animate*AsState`](/develop/ui/compose/animation#animate-as-state),\n[`CrossFade`](/develop/ui/compose/animation#crossfade),\n[`rememberInfiniteTransition`](/develop/ui/compose/animation#rememberinfinitetransition),\nand [`AnimatedContent`](/develop/ui/compose/animation#animatedcontent)\nAPIs. To access the latest features, use Animation Preview with\nAndroid Studio Narwhal Feature Drop and `compose.animation` 1.9.0 and higher.\n\nRecommended for you\n-------------------\n\n- Note: link text is displayed when JavaScript is off\n- [Animations in Compose](/develop/ui/compose/animation/introduction)\n- [Animation tooling support {:#tooling}](/develop/ui/compose/animation/tooling)\n- [Value-based animations](/develop/ui/compose/animation/value-based)"]]