Commit 6e4b14d
authored
fix: match
## 📜 Description
Don't update `backgroundColor`/`translucent` props of `StatusBar` if
`edge-to-edge` mode is enabled in RN core.
## 💡 Motivation and Context
According to latest spec we shouldn't update
`backgroundColor`/`translucent` props of `StatusBar` if `edge-to-edge`
mode is enabled:
<img width="829" height="427" alt="image"
src="https://github.com/user-attachments/assets/ec3ed681-d32a-42af-85cb-34d4fcebef7d"
/>
<img width="837" height="424" alt="image"
src="https://github.com/user-attachments/assets/739d7bc6-cdd5-4f82-b658-373272ddae9c"
/>
In this PR I check directly if `edge-to-edge` mode is enabled **only**
in RN core to keep a backward compatibility with old code and 3rd party
libs interop.
Closes
#1181
## 📢 Changelog
<!-- High level overview of important changes -->
<!-- For example: fixed status bar manipulation; added new types
declarations; -->
<!-- If your changes don't affect one of platform/language below - then
remove this platform/language -->
### Android
- added `isEdgeToEdgeEnabled` helper function in gradle;
- expose `IS_EDGE_TO_EDGE_ENABLED` flag in `BuildConfig`;
- don't modify `StatusBar` props such as `backgroundColor`/`translucent`
if `edge-to-edge` is enabled in RN core;
## 🤔 How Has This Been Tested?
Tested on Pixel 9 Pro (API 35, emulator) + E2E tests.
## 📸 Screenshots (if appropriate):
|Before|After|
|-------|-----|
|<img width="562" height="1187" alt="Image"
src="https://github.com/user-attachments/assets/f8ce4e05-5a58-4151-96b5-a8efe6a5a97e"
/>|<img width="562" height="1149" alt="Image"
src="https://github.com/user-attachments/assets/acaaff6a-d5a3-40ec-bcf4-85cf82d94189"
/>|
## 📝 Checklist
- [x] CI successfully passed
- [x] I added new mocks and corresponding unit-tests if library API was
changedStatusBar and edge-to-edge interop according to latest spec (#1185)1 parent 7f460b3 commit 6e4b14d
2 files changed
Lines changed: 17 additions & 0 deletions
File tree
- android
- src/main/java/com/reactnativekeyboardcontroller/modules/statusbar
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
29 | 33 | | |
30 | 34 | | |
31 | 35 | | |
| |||
55 | 59 | | |
56 | 60 | | |
57 | 61 | | |
| 62 | + | |
58 | 63 | | |
59 | 64 | | |
60 | 65 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
| |||
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
50 | 57 | | |
51 | 58 | | |
52 | 59 | | |
| |||
79 | 86 | | |
80 | 87 | | |
81 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
82 | 94 | | |
83 | 95 | | |
84 | 96 | | |
| |||
0 commit comments