我想将我的图像徽标从屏幕 A 动画到屏幕 B。在基于 XML 的布局中,可以使用
windowContentTransitions
和 transitionName
。所以我想问 Jetpack Compose 中是否有类似的功能?
我已经看到了这个https://github.com/mobnetic/compose-shared-element
但是,是否有类似于 XML 的内置功能?
compose 尚不支持。请参阅 kotlin-lang 上的对话:https://kotlinlang.slack.com/archives/CJLTWPH7S/p1616517641495500?thread_ts=1616516302.494300&cid=CJLTWPH7S
最近已实施。虽然它现在处于 alpha 阶段,但你可以看看它:
https://developer.android.com/develop/ui/compose/animation/shared-elements