software-mansion / react-native-reanimated

React Native's Animated library reimplemented
https://docs.swmansion.com/react-native-reanimated/
MIT License
9.09k stars 1.32k forks source link

feature: Detect edge-to-edge and set isStatusBarTranslucentAndroid / isNavigationBarTranslucentAndroid #6732

Open zoontek opened 2 days ago

zoontek commented 2 days ago

Summary

Similar to the PR I opened on the react-native-screens repository (I highly recommend to read the discussion there to understand the motivation behind this), this PR detects if the user enabled edge-to-edge and act accordingly: useAnimatedKeyboard are ignored, set to true automatically. If those are set, a warning is logged:

isStatusBarTranslucentAndroid and isNavigationBarTranslucentAndroid values are ignored when using react-native-edge-to-edge

It at some point this proposal lands in core, react-native-is-edge-to-edge will be updated to support both the library and the core edge-to-edge flag, making the transition seamless for the users.

Test plan