[Android] Layout animations enabled by default on android
See original GitHub issueDescription
Layout Animations are enabled by default on Android. The react-native doc says they are experimental on this platform:
https://reactnative.dev/docs/layoutanimation
I use layout animations on my app on iOS only and having them enabled on android breaks multiple parts of the app. Is it safe to just disable them again by calling the following code?
if (Platform.OS === 'android') {
if (UIManager.setLayoutAnimationEnabledExperimental) {
UIManager.setLayoutAnimationEnabledExperimental(false);
}
}
Here’s the line that enables them:
Steps to reproduce
Just install react-native-reanimated, launch an app ( you can use the example ).
Snack or a link to a repository
https://github.com/software-mansion/react-native-reanimated/tree/main/Example
Reanimated version
2.9.0
React Native version
0.67.4
Platforms
Android
JavaScript runtime
Hermes
Workflow
No response
Architecture
No response
Build type
No response
Device
No response
Device model
No response
Acknowledgements
Yes
Issue Analytics
- State:
- Created a year ago
- Comments:6
Top Results From Across the Web
Auto animate layout updates - Android Developers
Android offers pre-loaded animation that the system runs each time you make a change to the layout. All you need to do is...
Read more >The little secret of android:animateLayoutChanges
Recently, I have discovered a new one regarding android:animateLayoutChanges . For those unfamiliar with this XML attribute, it's a “automagical” way to animate...
Read more >Switch - how to enable default animation in Android
Switch - how to enable default animation in Android ... The property android:animateLayoutChanges="true" does not have any effect. Tried on ...
Read more >Animations | CodePath Android Cliffnotes
Layout Animations - This allows us to enable animations on any layout container or other ViewGroup such as LinearLayout, RelativeLayout, or ListView.
Read more >core/java/android/animation/LayoutTransition.java
This class enables automatic animations on layout changes in ViewGroup objects. To enable ... This transition type is not enabled by default; it...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Kinda weird, but try this
I know these are completely different. This is what I’m saying. react-native-reanimated is enabling react-native’s layout animation which I believe should not happen, hence, I created this issue.
If you put a breakpoint inside react-native’s code to enable react-native’s implementation of layout animations, you can clearly see that it is being enabled by react-native-reanimated. It should not.