On Android the withAnimation() scope is global: withAnimation() will animate any pending state changes on the visible screen, instead of executing a closure-scoped transition on the subtree.
I put together a repro skip app - The repro app has 2 sibling UI components, the opacity of each is changed from 1 to 0 for both, but only one component should animate the opacity per the withAnimation() closure.
- Android: both ui components animate
- iOS: only the closure-targeted component animates (expected behavior)
I am happy to attempts a PR, but it looks like an honest long-term fix will require a serious refactor so I am checking in first in case this needs to be handled by someone who is a lot more familiar with this codebase than I am.
On Android the
withAnimation()scope is global:withAnimation()will animate any pending state changes on the visible screen, instead of executing a closure-scoped transition on the subtree.I put together a repro skip app - The repro app has 2 sibling UI components, the opacity of each is changed from 1 to 0 for both, but only one component should animate the opacity per the
withAnimation()closure.I am happy to attempts a PR, but it looks like an honest long-term fix will require a serious refactor so I am checking in first in case this needs to be handled by someone who is a lot more familiar with this codebase than I am.