动画工具支持
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
Android Studio 支持在动画预览中检查 animate*AsState
、CrossFade
、rememberInfiniteTransition
、AnimatedContent
、updateTransition
和 animatedVisibility
。您可以执行以下操作:
- 逐帧预览过渡效果
- 检查过渡效果中所有动画的值
- 预览任何初始状态与目标状态之间的过渡
- 一次检查和协调多个动画
启动 Animation Preview 后,您会看到“Animations”窗格,并且可以在其中运行预览中包含的任何过渡效果。过渡效果及其每个动画值均标有默认名称。您可以通过在 updateTransition
和 AnimatedVisibility
函数中指定 label
参数来自定义标签。如需了解详情,请参阅动画预览。

为您推荐
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-21。
[null,null,["最后更新时间 (UTC):2025-08-21。"],[],[],null,["# Animation tooling support\n\nAndroid Studio supports inspection of [`animate*AsState`](/develop/ui/compose/value-based#animate-as-state), [`CrossFade`](/develop/ui/compose/animation/composables-modifiers#crossfade), [`rememberInfiniteTransition`](/develop/ui/compose/animation/value-based#rememberinfinitetransition), [`AnimatedContent`](/develop/ui/compose/animation/composables-modifiers#animatedcontent),\n[`updateTransition`](/develop/ui/compose/animation/value-based#updateTransition) and\n[`animatedVisibility`](/develop/ui/compose/animation/composables-modifiers#animatedvisibility) in\n[Animation Preview](/develop/ui/compose/tooling#animations). You can do the\nfollowing:\n\n- Preview a transition frame by frame\n- Inspect values for all animations in the transition\n- Preview a transition between any initial and target state\n- Inspect and coordinate multiple animations at once\n\nWhen you start Animation Preview, you see the \"Animations\" pane where you can\nrun any transition included in the preview. The transition as well as each of\nits animation values is labeled with a default name. You can customize the label\nby specifying the `label` parameter in the `updateTransition` and the\n`AnimatedVisibility` functions. For more information, see\n[Animation Preview](/develop/ui/compose/tooling/animation-preview).\n\nRecommended for you\n-------------------\n\n- Note: link text is displayed when JavaScript is off\n- [Value-based animations](/develop/ui/compose/animation/value-based)\n- [Animations in Compose](/develop/ui/compose/animation/introduction)\n- [Animation modifiers and composables](/develop/ui/compose/animation/composables-modifiers)"]]