Uh oh!
There was an error while loading. Please reload this page.
Fix: layout animations on Android - #46654
Conversation
coado
commented
Sep 26, 2024
Also, I don't think that setting |
facebook-github-bot
commented
Sep 26, 2024
@cortinico has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
javache
commented
Sep 26, 2024
If I understand correctly, we already call |
coado
commented
Sep 26, 2024
Which function do you refer to exactly? |
coado
commented
Sep 26, 2024
If you mean the one defined in |
javache
commented
Sep 26, 2024
Hmm, startSurfaceWithConstraints and startSurface in FabricUIManager don't seem aligned. Maybe the issue here is that when |
javache
commented
Sep 26, 2024
Working on a fix for this - I believe I found the discrepancy. |
cortinico
commented
Sep 27, 2024
Closing in favor of: |
Summary:
Layout animations are not working on the new architecture, because the animation driver is not added to the mounting coordinator. When the app starts running,
ReactInstance.javacalls startSurface onFabricUIManager.java, which starts the surface handler. The animation driver has to be added to the mounting coordinator after the surface handler starts because the mounting coordinator is created there, so I've added a check that will prevent adding an animation driver if the surface handler is not running.On the other hand, we could just call startSurface from the
Binding.cppwhich adds an animation driver internally, but I guess there is a reason to not do that 🤔Changelog:
[ANDROID] [FIXED] - add animation driver to the mounting coordinator on Fabric
Test Plan:
Tested on examples from docs in rn-tester.