Commit 77c0da5
feature: Detect edge-to-edge and set isStatusBarTranslucentAndroid / isNavigationBarTranslucentAndroid (#6732)
## Summary
Similar to [the
PR](software-mansion/react-native-screens#2464)
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](facebook/react-native#47554) 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
- Install
[react-native-edge-to-edge](https://github.com/zoontek/react-native-edge-to-edge)
in the example app.
- Don't set `isStatusBarTranslucentAndroid` /
`isNavigationBarTranslucentAndroid`, or set them to something else than
`true`
---------
Co-authored-by: Bartłomiej Błoniarz <bartlomiej.bloniarz@swmansion.com>1 parent a690680 commit 77c0da5
4 files changed
Lines changed: 32 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
| 93 | + | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
2 | 7 | | |
3 | 8 | | |
4 | 9 | | |
| |||
23 | 28 | | |
24 | 29 | | |
25 | 30 | | |
| 31 | + | |
26 | 32 | | |
27 | 33 | | |
28 | 34 | | |
| |||
112 | 118 | | |
113 | 119 | | |
114 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
115 | 130 | | |
116 | 131 | | |
117 | 132 | | |
118 | 133 | | |
119 | | - | |
120 | | - | |
| 134 | + | |
| 135 | + | |
121 | 136 | | |
122 | 137 | | |
123 | 138 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
| 25 | + | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17591 | 17591 | | |
17592 | 17592 | | |
17593 | 17593 | | |
| 17594 | + | |
| 17595 | + | |
| 17596 | + | |
| 17597 | + | |
| 17598 | + | |
| 17599 | + | |
| 17600 | + | |
| 17601 | + | |
| 17602 | + | |
| 17603 | + | |
17594 | 17604 | | |
17595 | 17605 | | |
17596 | 17606 | | |
| |||
17736 | 17746 | | |
17737 | 17747 | | |
17738 | 17748 | | |
| 17749 | + | |
17739 | 17750 | | |
17740 | 17751 | | |
17741 | 17752 | | |
| |||
0 commit comments