react-native-edge-to-edge 1.1.3 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -29,14 +29,14 @@ Recently, Google introduced a significant change: apps targeting SDK 35 will hav
29
29
 
30
30
  Currently, new React Native projects target SDK 34.
31
31
 
32
- ### Immersive mode
33
-
34
- [Immersive mode](https://developer.android.com/develop/ui/views/layout/immersive) allows you to hide the status and navigation bars, making it ideal for full-screen experiences. Currently, the built-in [`StatusBar`](https://reactnative.dev/docs/statusbar) component uses [`FLAG_FULLSCREEN`](https://developer.android.com/reference/android/view/WindowManager.LayoutParams#FLAG_FULLSCREEN), a flag that has been deprecated since Android 11.
35
-
36
32
  ### Consistency
37
33
 
38
34
  iOS has long used edge-to-edge displays, so adopting this design across all platforms ensures a consistent user experience. It also simplifies managing safe areas, eliminating the need for special cases specific to Android.
39
35
 
36
+ ### Immersive mode
37
+
38
+ [Immersive mode](https://developer.android.com/develop/ui/views/layout/immersive) allows you to hide the status and navigation bars, making it ideal for full-screen experiences. Currently, the built-in [`StatusBar`](https://reactnative.dev/docs/statusbar) component uses [`FLAG_FULLSCREEN`](https://developer.android.com/reference/android/view/WindowManager.LayoutParams#FLAG_FULLSCREEN), a flag that has been deprecated since Android 11.
39
+
40
40
  ## Installation
41
41
 
42
42
  ```bash
@@ -47,12 +47,14 @@ $ yarn add react-native-edge-to-edge
47
47
 
48
48
  ### Expo
49
49
 
50
- Add the library plugin in your `app.json` config file and [create a new build](https://docs.expo.dev/develop/development-builds/create-a-build/):
50
+ Add the library plugin in your `app.json` config file and [create a new build](https://docs.expo.dev/develop/development-builds/create-a-build/) 👷:
51
51
 
52
52
  ```diff
53
53
  {
54
54
  "expo": {
55
- + "plugins": ["react-native-edge-to-edge"]
55
+ + "plugins": [
56
+ + ["react-native-edge-to-edge", { "android": { "parentTheme": "Light" } }]
57
+ + ]
56
58
  }
57
59
  }
58
60
  ```
@@ -60,10 +62,18 @@ Add the library plugin in your `app.json` config file and [create a new build](h
60
62
  _📌 The available plugins options are:_
61
63
 
62
64
  ```ts
65
+ type Theme =
66
+ | "Default" // Theme.EdgeToEdge (default)
67
+ | "Material2" // Theme.EdgeToEdge.Material2
68
+ | "Material3" // Theme.EdgeToEdge.Material3
69
+ | "Light" // Theme.EdgeToEdge.Light
70
+ | "Material2.Light" // Theme.EdgeToEdge.Material2.Light
71
+ | "Material3.Light"; // Theme.EdgeToEdge.Material3.Light
72
+
63
73
  type Options = {
64
74
  android?: {
65
- // use an edge-to-edge version of `Theme.{MaterialComponents,Material3}.DayNight.NoActionBar`
66
- parentTheme?: "Material2" | "Material3"; // optional, default is `undefined` (`Theme.EdgeToEdge`)
75
+ // use an edge-to-edge version of `Theme.{MaterialComponents,Material3}.{DayNight,Light}.NoActionBar`
76
+ parentTheme?: Theme; // optional
67
77
  };
68
78
  };
69
79
  ```
@@ -77,7 +87,10 @@ Edit your `android/app/src/main/res/values/styles.xml` file to inherit from one
77
87
 
78
88
  ```diff
79
89
  <resources>
80
- <!-- inherit from Theme.EdgeToEdge / Theme.EdgeToEdge.Material2 / Theme.EdgeToEdge.Material3 -->
90
+ <!-- inherit from one of the provided edge-to-edge parent themes:
91
+ - Theme.EdgeToEdge / Theme.EdgeToEdge.Light
92
+ - Theme.EdgeToEdge.Material2 / Theme.EdgeToEdge.Material2.Light
93
+ - Theme.EdgeToEdge.Material3 / Theme.EdgeToEdge.Material3.Light -->
81
94
  - <style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
82
95
  + <style name="AppTheme" parent="Theme.EdgeToEdge">
83
96
  <!-- … -->
@@ -87,62 +100,9 @@ Edit your `android/app/src/main/res/values/styles.xml` file to inherit from one
87
100
 
88
101
  ## Considerations
89
102
 
90
- ### Third-party libraries
91
-
92
- Many libraries expose options that you can set to account for the transparency of status and navigation bars. For example, the [`useHideAnimation`](https://github.com/zoontek/react-native-bootsplash?tab=readme-ov-file#usehideanimation) hook in `react-native-bootsplash` has `statusBarTranslucent` and `navigationBarTranslucent` options, the [`useAnimatedKeyboard`](https://docs.swmansion.com/react-native-reanimated/docs/device/useAnimatedKeyboard) in `react-native-reanimated` has an `isStatusBarTranslucentAndroid` option, etc.
93
-
94
- > [!IMPORTANT]
95
- > Until third-party libraries officially add support for `react-native-edge-to-edge` to set these options automatically, you may need to adjust these options to prevent interference with the library.
96
-
97
- For library authors, we provide a lightweight package called `react-native-is-edge-to-edge` (note the `-is-`!), which checks whether `react-native-edge-to-edge` is installed, making it easy to update your library accordingly:
98
-
99
- ```ts
100
- import {
101
- controlEdgeToEdgeValues,
102
- isEdgeToEdge,
103
- } from "react-native-is-edge-to-edge";
104
-
105
- const EDGE_TO_EDGE = isEdgeToEdge();
106
-
107
- function MyAwesomeLibraryComponent({
108
- statusBarTranslucent,
109
- navigationBarTranslucent,
110
- }) {
111
- if (__DEV__) {
112
- // warn the user once about unnecessary defined values
113
- controlEdgeToEdgeValues({
114
- statusBarTranslucent,
115
- navigationBarTranslucent,
116
- });
117
- }
118
-
119
- return (
120
- <MyAwesomeLibraryNativeComponent
121
- statusBarTranslucent={EDGE_TO_EDGE || statusBarTranslucent}
122
- navigationBarTranslucent={EDGE_TO_EDGE || navigationBarTranslucent}
123
- // …
124
- />
125
- );
126
- }
127
- ```
128
-
129
- If you want to check for the library's presence on the native side to bypass certain parts of your code, consider using this small utility:
130
-
131
- ```kotlin
132
- object EdgeToEdge {
133
- // we cannot detect edge-to-edge, but we can detect react-native-edge-to-edge install
134
- val ENABLED: Boolean = try {
135
- Class.forName("com.zoontek.rnedgetoedge.EdgeToEdgePackage")
136
- true
137
- } catch (exception: ClassNotFoundException) {
138
- false
139
- }
140
- }
141
- ```
142
-
143
103
  ### Keyboard management
144
104
 
145
- Enabling edge-to-edge display disrupts basic Android keyboard management (`android:windowSoftInputMode="adjustResize"`), requiring an alternative solution. While [`KeyboardAvoidingView`](https://reactnative.dev/docs/keyboardavoidingview) is a viable option, we recommend using [react-native-keyboard-controller](https://github.com/kirillzyusko/react-native-keyboard-controller) for its enhanced capabilities.
105
+ Enabling edge-to-edge display disrupts Android keyboard management (`android:windowSoftInputMode="adjustResize"`), requiring an alternative solution. While [`KeyboardAvoidingView`](https://reactnative.dev/docs/keyboardavoidingview) is a viable option, we recommend using [react-native-keyboard-controller](https://github.com/kirillzyusko/react-native-keyboard-controller) for its enhanced capabilities.
146
106
 
147
107
  ### Safe area management
148
108
 
@@ -150,13 +110,17 @@ Effective safe area management is essential to prevent content from being displa
150
110
 
151
111
  ### Modal component quirks
152
112
 
153
- Status bar management has never worked effectively with the built-in [`Modal`](https://reactnative.dev/docs/modal) component (as it creates a `Dialog` with a `Window` instance distinct from `MainActivity`). A `statusBarTranslucent` prop was introduced, but it is insufficient because there is no equivalent for the navigation bar. Instead, we recommend using the [react-navigation modals](https://reactnavigation.org/docs/modal), which do not suffer from this issue, as they utilize [react-native-screens](https://docs.swmansion.com/react-native-screens) and `Fragment` behind the scenes.
113
+ Edge-to-edge support for the built-in [`Modal`](https://reactnative.dev/docs/modal) component will be available in [React Native 0.77](https://github.com/facebook/react-native/pull/47254). Meanwhile, we recommend using the [react-navigation modals](https://reactnavigation.org/docs/modal) or the [`expo-router` modal screens](https://docs.expo.dev/router/advanced/modals/#modal-screen-using-expo-router).
114
+
115
+ ### 3-button navigation mode
116
+
117
+ This library follows the default [AndroidX `enableEdgeToEdge`](https://developer.android.com/develop/ui/views/layout/edge-to-edge) behavior. The system bars are transparent, except in 3-button navigation mode, where the navigation bar becomes translucent (semi-opaque). Its color adjusts based on light or dark theme.
154
118
 
155
119
  ## API
156
120
 
157
121
  ### `<SystemBars />`
158
122
 
159
- A component for managing your app's system bars. This replace [`StatusBar`](https://reactnative.dev/docs/statusbar), [`expo-status-bar`](https://docs.expo.dev/versions/latest/sdk/status-bar) and [`expo-navigation-bar`](https://docs.expo.dev/versions/latest/sdk/navigation-bar/) (that uses a lot of now [deprecated APIs](https://developer.android.com/about/versions/15/behavior-changes-15#deprecated-apis)).
123
+ A component for managing your app's system bars. Replace all occurrences of [`StatusBar`](https://reactnative.dev/docs/statusbar), [`expo-status-bar`](https://docs.expo.dev/versions/latest/sdk/status-bar) and [`expo-navigation-bar`](https://docs.expo.dev/versions/latest/sdk/navigation-bar/) with it (they uses a lot of now [deprecated APIs](https://developer.android.com/about/versions/15/behavior-changes-15#deprecated-apis) and interfere with edge-to-edge).
160
124
 
161
125
  ```tsx
162
126
  import { SystemBars } from "react-native-edge-to-edge";
@@ -199,3 +163,56 @@ const entry: SystemBarsEntry = SystemBars.replaceStackEntry(
199
163
  props /*: SystemBarsProps */,
200
164
  );
201
165
  ```
166
+
167
+ ## Third-party
168
+
169
+ Many libraries expose options that you can set to account for the transparency of status and navigation bars. For example, the [`useHideAnimation`](https://github.com/zoontek/react-native-bootsplash?tab=readme-ov-file#usehideanimation) hook in `react-native-bootsplash` has `statusBarTranslucent` and `navigationBarTranslucent` options, the [`useAnimatedKeyboard`](https://docs.swmansion.com/react-native-reanimated/docs/device/useAnimatedKeyboard) in `react-native-reanimated` has an `isStatusBarTranslucentAndroid` option, etc.
170
+
171
+ > [!IMPORTANT]
172
+ > Until third-party libraries officially add support for `react-native-edge-to-edge` to set these options automatically, you may need to adjust these options to prevent interference with the library.
173
+
174
+ For library authors, we provide a lightweight package called `react-native-is-edge-to-edge` (note the `-is-`!), which checks whether `react-native-edge-to-edge` is installed, making it easy to update your library accordingly:
175
+
176
+ ```ts
177
+ import {
178
+ controlEdgeToEdgeValues,
179
+ isEdgeToEdge,
180
+ } from "react-native-is-edge-to-edge";
181
+
182
+ const EDGE_TO_EDGE = isEdgeToEdge();
183
+
184
+ function MyAwesomeLibraryComponent({
185
+ statusBarTranslucent,
186
+ navigationBarTranslucent,
187
+ }) {
188
+ if (__DEV__) {
189
+ // warn the user once about unnecessary defined values
190
+ controlEdgeToEdgeValues({
191
+ statusBarTranslucent,
192
+ navigationBarTranslucent,
193
+ });
194
+ }
195
+
196
+ return (
197
+ <MyAwesomeLibraryNativeComponent
198
+ statusBarTranslucent={EDGE_TO_EDGE || statusBarTranslucent}
199
+ navigationBarTranslucent={EDGE_TO_EDGE || navigationBarTranslucent}
200
+ // …
201
+ />
202
+ );
203
+ }
204
+ ```
205
+
206
+ If you want to check for the library's presence on the native side to bypass certain parts of your code, consider using this small utility:
207
+
208
+ ```kotlin
209
+ object EdgeToEdge {
210
+ // we cannot detect edge-to-edge, but we can detect react-native-edge-to-edge install
211
+ val ENABLED: Boolean = try {
212
+ Class.forName("com.zoontek.rnedgetoedge.EdgeToEdgePackage")
213
+ true
214
+ } catch (exception: ClassNotFoundException) {
215
+ false
216
+ }
217
+ }
218
+ ```
@@ -3,4 +3,8 @@
3
3
  <public name="Theme.EdgeToEdge" type="style" />
4
4
  <public name="Theme.EdgeToEdge.Material2" type="style" />
5
5
  <public name="Theme.EdgeToEdge.Material3" type="style" />
6
+
7
+ <public name="Theme.EdgeToEdge.Light" type="style" />
8
+ <public name="Theme.EdgeToEdge.Material2.Light" type="style" />
9
+ <public name="Theme.EdgeToEdge.Material3.Light" type="style" />
6
10
  </resources>
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
2
  <resources>
3
- <style name="Theme.EdgeToEdge.Common" parent="Theme.AppCompat.DayNight.NoActionBar">
3
+ <style name="Theme.EdgeToEdge.DayNight.Common" parent="Theme.AppCompat.DayNight.NoActionBar">
4
4
  <item name="android:windowDrawsSystemBarBackgrounds">true</item>
5
5
  <item name="android:fitsSystemWindows">false</item>
6
6
  <item name="android:navigationBarColor">@color/navigationBarColor</item>
@@ -8,7 +8,7 @@
8
8
  <item name="android:windowLightStatusBar">@bool/windowLightSystemBars</item>
9
9
  </style>
10
10
 
11
- <style name="Theme.EdgeToEdge.Material2.Common" parent="Theme.MaterialComponents.DayNight.NoActionBar">
11
+ <style name="Theme.EdgeToEdge.Material2.DayNight.Common" parent="Theme.MaterialComponents.DayNight.NoActionBar">
12
12
  <item name="android:windowDrawsSystemBarBackgrounds">true</item>
13
13
  <item name="android:fitsSystemWindows">false</item>
14
14
  <item name="android:navigationBarColor">@color/navigationBarColor</item>
@@ -16,7 +16,7 @@
16
16
  <item name="android:windowLightStatusBar">@bool/windowLightSystemBars</item>
17
17
  </style>
18
18
 
19
- <style name="Theme.EdgeToEdge.Material3.Common" parent="Theme.Material3.DayNight.NoActionBar">
19
+ <style name="Theme.EdgeToEdge.Material3.DayNight.Common" parent="Theme.Material3.DayNight.NoActionBar">
20
20
  <item name="android:windowDrawsSystemBarBackgrounds">true</item>
21
21
  <item name="android:fitsSystemWindows">false</item>
22
22
  <item name="android:navigationBarColor">@color/navigationBarColor</item>
@@ -24,7 +24,35 @@
24
24
  <item name="android:windowLightStatusBar">@bool/windowLightSystemBars</item>
25
25
  </style>
26
26
 
27
- <style name="Theme.EdgeToEdge" parent="Theme.EdgeToEdge.Common" />
28
- <style name="Theme.EdgeToEdge.Material2" parent="Theme.EdgeToEdge.Material2.Common" />
29
- <style name="Theme.EdgeToEdge.Material3" parent="Theme.EdgeToEdge.Material3.Common" />
27
+ <style name="Theme.EdgeToEdge.Light.Common" parent="Theme.AppCompat.Light.NoActionBar">
28
+ <item name="android:windowDrawsSystemBarBackgrounds">true</item>
29
+ <item name="android:fitsSystemWindows">false</item>
30
+ <item name="android:navigationBarColor">@color/navigationBarColor</item>
31
+ <item name="android:statusBarColor">@android:color/transparent</item>
32
+ <item name="android:windowLightStatusBar">@bool/windowLightSystemBars</item>
33
+ </style>
34
+
35
+ <style name="Theme.EdgeToEdge.Material2.Light.Common" parent="Theme.MaterialComponents.Light.NoActionBar">
36
+ <item name="android:windowDrawsSystemBarBackgrounds">true</item>
37
+ <item name="android:fitsSystemWindows">false</item>
38
+ <item name="android:navigationBarColor">@color/navigationBarColor</item>
39
+ <item name="android:statusBarColor">@android:color/transparent</item>
40
+ <item name="android:windowLightStatusBar">@bool/windowLightSystemBars</item>
41
+ </style>
42
+
43
+ <style name="Theme.EdgeToEdge.Material3.Light.Common" parent="Theme.Material3.Light.NoActionBar">
44
+ <item name="android:windowDrawsSystemBarBackgrounds">true</item>
45
+ <item name="android:fitsSystemWindows">false</item>
46
+ <item name="android:navigationBarColor">@color/navigationBarColor</item>
47
+ <item name="android:statusBarColor">@android:color/transparent</item>
48
+ <item name="android:windowLightStatusBar">@bool/windowLightSystemBars</item>
49
+ </style>
50
+
51
+ <style name="Theme.EdgeToEdge" parent="Theme.EdgeToEdge.DayNight.Common" />
52
+ <style name="Theme.EdgeToEdge.Material2" parent="Theme.EdgeToEdge.Material2.DayNight.Common" />
53
+ <style name="Theme.EdgeToEdge.Material3" parent="Theme.EdgeToEdge.Material3.DayNight.Common" />
54
+
55
+ <style name="Theme.EdgeToEdge.Light" parent="Theme.EdgeToEdge.Light.Common" />
56
+ <style name="Theme.EdgeToEdge.Material2.Light" parent="Theme.EdgeToEdge.Material2.Light.Common" />
57
+ <style name="Theme.EdgeToEdge.Material3.Light" parent="Theme.EdgeToEdge.Material3.Light.Common" />
30
58
  </resources>
@@ -1,16 +1,31 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
2
  <resources>
3
- <style name="Theme.EdgeToEdge" parent="Theme.EdgeToEdge.Common">
3
+ <style name="Theme.EdgeToEdge" parent="Theme.EdgeToEdge.DayNight.Common">
4
4
  <item name="android:windowLightNavigationBar">@bool/windowLightSystemBars</item>
5
5
  <item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
6
6
  </style>
7
7
 
8
- <style name="Theme.EdgeToEdge.Material2" parent="Theme.EdgeToEdge.Material2.Common">
8
+ <style name="Theme.EdgeToEdge.Material2" parent="Theme.EdgeToEdge.Material2.DayNight.Common">
9
9
  <item name="android:windowLightNavigationBar">@bool/windowLightSystemBars</item>
10
10
  <item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
11
11
  </style>
12
12
 
13
- <style name="Theme.EdgeToEdge.Material3" parent="Theme.EdgeToEdge.Material3.Common">
13
+ <style name="Theme.EdgeToEdge.Material3" parent="Theme.EdgeToEdge.Material3.DayNight.Common">
14
+ <item name="android:windowLightNavigationBar">@bool/windowLightSystemBars</item>
15
+ <item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
16
+ </style>
17
+
18
+ <style name="Theme.EdgeToEdge.Light" parent="Theme.EdgeToEdge.Light.Common">
19
+ <item name="android:windowLightNavigationBar">@bool/windowLightSystemBars</item>
20
+ <item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
21
+ </style>
22
+
23
+ <style name="Theme.EdgeToEdge.Material2.Light" parent="Theme.EdgeToEdge.Material2.Light.Common">
24
+ <item name="android:windowLightNavigationBar">@bool/windowLightSystemBars</item>
25
+ <item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
26
+ </style>
27
+
28
+ <style name="Theme.EdgeToEdge.Material3.Light" parent="Theme.EdgeToEdge.Material3.Light.Common">
14
29
  <item name="android:windowLightNavigationBar">@bool/windowLightSystemBars</item>
15
30
  <item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
16
31
  </style>
@@ -1,20 +1,41 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
2
  <resources>
3
- <style name="Theme.EdgeToEdge" parent="Theme.EdgeToEdge.Common">
3
+ <style name="Theme.EdgeToEdge" parent="Theme.EdgeToEdge.DayNight.Common">
4
4
  <item name="android:windowLightNavigationBar">@bool/windowLightSystemBars</item>
5
5
  <item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
6
6
  <item name="android:enforceStatusBarContrast">false</item>
7
7
  <item name="android:enforceNavigationBarContrast">true</item>
8
8
  </style>
9
9
 
10
- <style name="Theme.EdgeToEdge.Material2" parent="Theme.EdgeToEdge.Material2.Common">
10
+ <style name="Theme.EdgeToEdge.Material2" parent="Theme.EdgeToEdge.Material2.DayNight.Common">
11
11
  <item name="android:windowLightNavigationBar">@bool/windowLightSystemBars</item>
12
12
  <item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
13
13
  <item name="android:enforceStatusBarContrast">false</item>
14
14
  <item name="android:enforceNavigationBarContrast">true</item>
15
15
  </style>
16
16
 
17
- <style name="Theme.EdgeToEdge.Material3" parent="Theme.EdgeToEdge.Material3.Common">
17
+ <style name="Theme.EdgeToEdge.Material3" parent="Theme.EdgeToEdge.Material3.DayNight.Common">
18
+ <item name="android:windowLightNavigationBar">@bool/windowLightSystemBars</item>
19
+ <item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
20
+ <item name="android:enforceStatusBarContrast">false</item>
21
+ <item name="android:enforceNavigationBarContrast">true</item>
22
+ </style>
23
+
24
+ <style name="Theme.EdgeToEdge.Light" parent="Theme.EdgeToEdge.Light.Common">
25
+ <item name="android:windowLightNavigationBar">@bool/windowLightSystemBars</item>
26
+ <item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
27
+ <item name="android:enforceStatusBarContrast">false</item>
28
+ <item name="android:enforceNavigationBarContrast">true</item>
29
+ </style>
30
+
31
+ <style name="Theme.EdgeToEdge.Material2.Light" parent="Theme.EdgeToEdge.Material2.Light.Common">
32
+ <item name="android:windowLightNavigationBar">@bool/windowLightSystemBars</item>
33
+ <item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
34
+ <item name="android:enforceStatusBarContrast">false</item>
35
+ <item name="android:enforceNavigationBarContrast">true</item>
36
+ </style>
37
+
38
+ <style name="Theme.EdgeToEdge.Material3.Light" parent="Theme.EdgeToEdge.Material3.Light.Common">
18
39
  <item name="android:windowLightNavigationBar">@bool/windowLightSystemBars</item>
19
40
  <item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
20
41
  <item name="android:enforceStatusBarContrast">false</item>
@@ -1,20 +1,41 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
2
  <resources>
3
- <style name="Theme.EdgeToEdge" parent="Theme.EdgeToEdge.Common">
3
+ <style name="Theme.EdgeToEdge" parent="Theme.EdgeToEdge.DayNight.Common">
4
4
  <item name="android:windowLightNavigationBar">@bool/windowLightSystemBars</item>
5
5
  <item name="android:windowLayoutInDisplayCutoutMode">always</item>
6
6
  <item name="android:enforceStatusBarContrast">false</item>
7
7
  <item name="android:enforceNavigationBarContrast">true</item>
8
8
  </style>
9
9
 
10
- <style name="Theme.EdgeToEdge.Material2" parent="Theme.EdgeToEdge.Material2.Common">
10
+ <style name="Theme.EdgeToEdge.Material2" parent="Theme.EdgeToEdge.Material2.DayNight.Common">
11
11
  <item name="android:windowLightNavigationBar">@bool/windowLightSystemBars</item>
12
12
  <item name="android:windowLayoutInDisplayCutoutMode">always</item>
13
13
  <item name="android:enforceStatusBarContrast">false</item>
14
14
  <item name="android:enforceNavigationBarContrast">true</item>
15
15
  </style>
16
16
 
17
- <style name="Theme.EdgeToEdge.Material3" parent="Theme.EdgeToEdge.Material3.Common">
17
+ <style name="Theme.EdgeToEdge.Material3" parent="Theme.EdgeToEdge.Material3.DayNight.Common">
18
+ <item name="android:windowLightNavigationBar">@bool/windowLightSystemBars</item>
19
+ <item name="android:windowLayoutInDisplayCutoutMode">always</item>
20
+ <item name="android:enforceStatusBarContrast">false</item>
21
+ <item name="android:enforceNavigationBarContrast">true</item>
22
+ </style>
23
+
24
+ <style name="Theme.EdgeToEdge.Light" parent="Theme.EdgeToEdge.Light.Common">
25
+ <item name="android:windowLightNavigationBar">@bool/windowLightSystemBars</item>
26
+ <item name="android:windowLayoutInDisplayCutoutMode">always</item>
27
+ <item name="android:enforceStatusBarContrast">false</item>
28
+ <item name="android:enforceNavigationBarContrast">true</item>
29
+ </style>
30
+
31
+ <style name="Theme.EdgeToEdge.Material2.Light" parent="Theme.EdgeToEdge.Material2.Light.Common">
32
+ <item name="android:windowLightNavigationBar">@bool/windowLightSystemBars</item>
33
+ <item name="android:windowLayoutInDisplayCutoutMode">always</item>
34
+ <item name="android:enforceStatusBarContrast">false</item>
35
+ <item name="android:enforceNavigationBarContrast">true</item>
36
+ </style>
37
+
38
+ <style name="Theme.EdgeToEdge.Material3.Light" parent="Theme.EdgeToEdge.Material3.Light.Common">
18
39
  <item name="android:windowLightNavigationBar">@bool/windowLightSystemBars</item>
19
40
  <item name="android:windowLayoutInDisplayCutoutMode">always</item>
20
41
  <item name="android:enforceStatusBarContrast">false</item>
@@ -7,8 +7,12 @@ exports.default = void 0;
7
7
  var _configPlugins = require("@expo/config-plugins");
8
8
  const withAndroidEdgeToEdgeTheme = (config, props = {}) => {
9
9
  const themes = {
10
+ Default: "Theme.EdgeToEdge",
10
11
  Material2: "Theme.EdgeToEdge.Material2",
11
- Material3: "Theme.EdgeToEdge.Material3"
12
+ Material3: "Theme.EdgeToEdge.Material3",
13
+ Light: "Theme.EdgeToEdge.Light",
14
+ "Material2.Light": "Theme.EdgeToEdge.Material2.Light",
15
+ "Material3.Light": "Theme.EdgeToEdge.Material3.Light"
12
16
  };
13
17
  const ignoreList = new Set(["android:enforceNavigationBarContrast", "android:enforceStatusBarContrast", "android:fitsSystemWindows", "android:navigationBarColor", "android:statusBarColor", "android:windowDrawsSystemBarBackgrounds", "android:windowLayoutInDisplayCutoutMode", "android:windowLightNavigationBar", "android:windowLightStatusBar", "android:windowTranslucentNavigation", "android:windowTranslucentStatus"]);
14
18
  return (0, _configPlugins.withAndroidStyles)(config, config => {
@@ -27,7 +31,7 @@ const withAndroidEdgeToEdgeTheme = (config, props = {}) => {
27
31
  } = android;
28
32
  config.modResults.resources.style = config.modResults.resources.style?.map(style => {
29
33
  if (style.$.name === "AppTheme") {
30
- style.$.parent = themes[parentTheme] ?? "Theme.EdgeToEdge";
34
+ style.$.parent = themes[parentTheme] ?? themes["Default"];
31
35
  if (style.item != null) {
32
36
  style.item = style.item.filter(item => !ignoreList.has(item.$.name));
33
37
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_configPlugins","require","withAndroidEdgeToEdgeTheme","config","props","themes","Material2","Material3","ignoreList","Set","withAndroidStyles","androidStatusBar","userInterfaceStyle","barStyle","android","parentTheme","modResults","resources","style","map","$","name","parent","item","filter","has","push","_","String","_default","exports","default","createRunOncePlugin"],"sourceRoot":"../../src","sources":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CACvC,CAAC;QACH;QAEA,IAAIR,QAAQ,IAAI,IAAI,EAAE;UACpBK,KAAK,CAACK,IAAI,CAACG,IAAI,CAAC;YACdN,CAAC,EAAE;cAAEC,IAAI,EAAE;YAA+B,CAAC;YAC3CM,CAAC,EAAEC,MAAM,CAACf,QAAQ,KAAK,cAAc;UACvC,CAAC,CAAC;QACJ,CAAC,MAAM,IAAID,kBAAkB,KAAK,WAAW,EAAE;UAC7CM,KAAK,CAACK,IAAI,CAACG,IAAI,CAAC;YACdN,CAAC,EAAE;cAAEC,IAAI,EAAE;YAA+B,CAAC;YAC3CM,CAAC,EAAEC,MAAM,CAAChB,kBAAkB,KAAK,OAAO;UAC1C,CAAC,CAAC;QACJ;MACF;MAEA,OAAOM,KAAK;IACd,CACF,CAAC;IAED,OAAOf,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;AAAC,IAAA0B,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEa,IAAAC,kCAAmB,EAChC9B,0BAA0B,EAC1B,2BACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_configPlugins","require","withAndroidEdgeToEdgeTheme","config","props","themes","Default","Material2","Material3","Light","ignoreList","Set","withAndroidStyles","androidStatusBar","userInterfaceStyle","barStyle","android","parentTheme","modResults","resources","style","map","$","name","parent","item","filter","has","push","_","String","_default","exports","default","createRunOncePlugin"],"sourceRoot":"../../src","sources":["expo.ts"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AAgBA,MAAMC,0BAA+C,GAAGA,CACtDC,MAAM,EACNC,KAAK,GAAG,CAAC,CAAC,KACP;EACH,MAAMC,MAA6B,GAAG;IACpCC,OAAO,EAAE,kBAAkB;IAC3BC,SAAS,EAAE,4BAA4B;IACvCC,SAAS,EAAE,4BAA4B;IAEvCC,KAAK,EAAE,wBAAwB;IAC/B,iBAAiB,EAAE,kCAAkC;IACrD,iBAAiB,EAAE;EACrB,CAAC;EAED,MAAMC,UAAU,GAAG,IAAIC,GAA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MAAM,IAAID,kBAAkB,KAAK,WAAW,EAAE;UAC7CM,KAAK,CAACK,IAAI,CAACG,IAAI,CAAC;YACdN,CAAC,EAAE;cAAEC,IAAI,EAAE;YAA+B,CAAC;YAC3CM,CAAC,EAAEC,MAAM,CAAChB,kBAAkB,KAAK,OAAO;UAC1C,CAAC,CAAC;QACJ;MACF;MAEA,OAAOM,KAAK;IACd,CACF,CAAC;IAED,OAAOjB,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;AAAC,IAAA4B,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEa,IAAAC,kCAAmB,EAChChC,0BAA0B,EAC1B,2BACF,CAAC","ignoreList":[]}
@@ -3,8 +3,12 @@
3
3
  import { createRunOncePlugin, withAndroidStyles } from "@expo/config-plugins";
4
4
  const withAndroidEdgeToEdgeTheme = (config, props = {}) => {
5
5
  const themes = {
6
+ Default: "Theme.EdgeToEdge",
6
7
  Material2: "Theme.EdgeToEdge.Material2",
7
- Material3: "Theme.EdgeToEdge.Material3"
8
+ Material3: "Theme.EdgeToEdge.Material3",
9
+ Light: "Theme.EdgeToEdge.Light",
10
+ "Material2.Light": "Theme.EdgeToEdge.Material2.Light",
11
+ "Material3.Light": "Theme.EdgeToEdge.Material3.Light"
8
12
  };
9
13
  const ignoreList = new Set(["android:enforceNavigationBarContrast", "android:enforceStatusBarContrast", "android:fitsSystemWindows", "android:navigationBarColor", "android:statusBarColor", "android:windowDrawsSystemBarBackgrounds", "android:windowLayoutInDisplayCutoutMode", "android:windowLightNavigationBar", "android:windowLightStatusBar", "android:windowTranslucentNavigation", "android:windowTranslucentStatus"]);
10
14
  return withAndroidStyles(config, config => {
@@ -23,7 +27,7 @@ const withAndroidEdgeToEdgeTheme = (config, props = {}) => {
23
27
  } = android;
24
28
  config.modResults.resources.style = config.modResults.resources.style?.map(style => {
25
29
  if (style.$.name === "AppTheme") {
26
- style.$.parent = themes[parentTheme] ?? "Theme.EdgeToEdge";
30
+ style.$.parent = themes[parentTheme] ?? themes["Default"];
27
31
  if (style.item != null) {
28
32
  style.item = style.item.filter(item => !ignoreList.has(item.$.name));
29
33
  }
@@ -1 +1 @@
1
- {"version":3,"names":["createRunOncePlugin","withAndroidStyles","withAndroidEdgeToEdgeTheme","config","props","themes","Material2","Material3","ignoreList","Set","androidStatusBar","userInterfaceStyle","barStyle","android","parentTheme","modResults","resources","style","map","$","name","parent","item","filter","has","push","_","String"],"sourceRoot":"../../src","sources":["expo.ts"],"mappings":";;AAAA,SAEEA,mBAAmB,EACnBC,iBAAiB,QACZ,sBAAsB;AAK7B,MAAMC,0BAA+C,GAAGA,CACtDC,MAAM,EACNC,KAAK,GAAG,CAAC,CAAC,KACP;EACH,MAAMC,MAA8B,GAAG;IACrCC,SAAS,EAAE,4BAA4B;IACvCC,SAAS,EAAE;EACb,CAAiC;EAEjC,MAAMC,UAAU,GAAG,IAAIC,GAAG,CAAC,CACzB,sCAAsC,EACtC,kCAAkC,EAClC,2BAA2B,EAC3B,4BAA4B,EAC5B,wBAAwB,EACxB,yCAAyC,EACzC,yCAAyC,EACzC,kCAAkC,EAClC,8BAA8B,EAC9B,qCAAqC,EACrC,iCAAiC,CAClC,CAAC;EAEF,OAAOR,iBAAiB,CAACE,MAAM,EAAGA,MAAM,IAAK;IAC3C,MAAM;MAAEO,gBAAgB,GAAG,CAAC,CAAC;MAAEC,kBAAkB,GAAG;IAAQ,CAAC,GAAGR,MAAM;IACtE,MAAM;MAAES;IAAS,CAAC,GAAGF,gBAAgB;IACrC,MAAM;MAAEG,OAAO,GAAG,CAAC;IAAE,CAAC,GAAGT,KAAK;IAC9B,MAAM;MAAEU,WAAW,GAAG;IAAU,CAAC,GAAGD,OAAO;IAE3CV,MAAM,CAACY,UAAU,CAACC,SAAS,CAACC,KAAK,GAAGd,MAAM,CAACY,UAAU,CAACC,SAAS,CAACC,KAAK,EAAEC,GAAG,CACvED,KAAK,IAAmB;MACvB,IAAIA,KAAK,CAACE,CAAC,CAACC,IAAI,KAAK,UAAU,EAAE;QAC/BH,KAAK,CAACE,CAAC,CAACE,MAAM,GAAGhB,MAAM,CAACS,WAAW,CAAC,IAAI,kBAAkB;QAE1D,IAAIG,KAAK,CAACK,IAAI,IAAI,IAAI,EAAE;UACtBL,KAAK,CAACK,IAAI,GAAGL,KAAK,CAACK,IAAI,CAACC,MAAM,CAC3BD,IAAI,IAAK,CAACd,UAAU,CAACgB,GAAG,CAACF,IAAI,CAACH,CAAC,CAACC,IAAI,CACvC,CAAC;QACH;QAEA,IAAIR,QAAQ,IAAI,IAAI,EAAE;UACpBK,KAAK,CAACK,IAAI,CAACG,IAAI,CAAC;YACdN,CAAC,EAAE;cAAEC,IAAI,EAAE;YAA+B,CAAC;YAC3CM,CAAC,EAAEC,MAAM,CAACf,QAAQ,KAAK,cAAc;UACvC,CAAC,CAAC;QACJ,CAAC,MAAM,IAAID,kBAAkB,KAAK,WAAW,EAAE;UAC7CM,KAAK,CAACK,IAAI,CAACG,IAAI,CAAC;YACdN,CAAC,EAAE;cAAEC,IAAI,EAAE;YAA+B,CAAC;YAC3CM,CAAC,EAAEC,MAAM,CAAChB,kBAAkB,KAAK,OAAO;UAC1C,CAAC,CAAC;QACJ;MACF;MAEA,OAAOM,KAAK;IACd,CACF,CAAC;IAED,OAAOd,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;AAED,eAAeH,mBAAmB,CAChCE,0BAA0B,EAC1B,2BACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["createRunOncePlugin","withAndroidStyles","withAndroidEdgeToEdgeTheme","config","props","themes","Default","Material2","Material3","Light","ignoreList","Set","androidStatusBar","userInterfaceStyle","barStyle","android","parentTheme","modResults","resources","style","map","$","name","parent","item","filter","has","push","_","String"],"sourceRoot":"../../src","sources":["expo.ts"],"mappings":";;AAAA,SAEEA,mBAAmB,EACnBC,iBAAiB,QACZ,sBAAsB;AAY7B,MAAMC,0BAA+C,GAAGA,CACtDC,MAAM,EACNC,KAAK,GAAG,CAAC,CAAC,KACP;EACH,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;QACH;QAEA,IAAIR,QAAQ,IAAI,IAAI,EAAE;UACpBK,KAAK,CAACK,IAAI,CAACG,IAAI,CAAC;YACdN,CAAC,EAAE;cAAEC,IAAI,EAAE;YAA+B,CAAC;YAC3CM,CAAC,EAAEC,MAAM,CAACf,QAAQ,KAAK,cAAc;UACvC,CAAC,CAAC;QACJ,CAAC,MAAM,IAAID,kBAAkB,KAAK,WAAW,EAAE;UAC7CM,KAAK,CAACK,IAAI,CAACG,IAAI,CAAC;YACdN,CAAC,EAAE;cAAEC,IAAI,EAAE;YAA+B,CAAC;YAC3CM,CAAC,EAAEC,MAAM,CAAChB,kBAAkB,KAAK,OAAO;UAC1C,CAAC,CAAC;QACJ;MACF;MAEA,OAAOM,KAAK;IACd,CACF,CAAC;IAED,OAAOhB,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;AAED,eAAeH,mBAAmB,CAChCE,0BAA0B,EAC1B,2BACF,CAAC","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import { ConfigPlugin } from "@expo/config-plugins";
2
- type Theme = "Material2" | "Material3";
2
+ type Theme = "Default" | "Material2" | "Material3" | "Light" | "Material2.Light" | "Material3.Light";
3
3
  type Props = {
4
4
  android?: {
5
5
  parentTheme?: Theme;
@@ -1 +1 @@
1
- {"version":3,"file":"expo.d.ts","sourceRoot":"","sources":["../../src/expo.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAGb,MAAM,sBAAsB,CAAC;AAE9B,KAAK,KAAK,GAAG,WAAW,GAAG,WAAW,CAAC;AACvC,KAAK,KAAK,GAAG;IAAE,OAAO,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,KAAK,CAAA;KAAE,CAAA;CAAE,GAAG,SAAS,CAAC;;AA+D/D,wBAGE"}
1
+ {"version":3,"file":"expo.d.ts","sourceRoot":"","sources":["../../src/expo.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAGb,MAAM,sBAAsB,CAAC;AAE9B,KAAK,KAAK,GACN,SAAS,GACT,WAAW,GACX,WAAW,GACX,OAAO,GACP,iBAAiB,GACjB,iBAAiB,CAAC;AAEtB,KAAK,KAAK,GAAG;IAAE,OAAO,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,KAAK,CAAA;KAAE,CAAA;CAAE,GAAG,SAAS,CAAC;;AAoE/D,wBAGE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-edge-to-edge",
3
- "version": "1.1.3",
3
+ "version": "1.2.0",
4
4
  "license": "MIT",
5
5
  "description": "Effortlessly enable edge-to-edge display in React Native",
6
6
  "author": "Mathieu Acthernoene <zoontek@gmail.com>",
@@ -60,12 +60,12 @@
60
60
  "@babel/preset-env": "^7.25.3",
61
61
  "@expo/config-plugins": "^7.0.0 || ^8.0.0 || ^9.0.0",
62
62
  "@types/react": "^18.2.6",
63
- "prettier": "^3.3.3",
63
+ "prettier": "^3.4.2",
64
64
  "prettier-plugin-organize-imports": "^4.1.0",
65
65
  "react": "18.3.1",
66
- "react-native": "0.76.2",
67
- "react-native-builder-bob": "^0.31.0",
68
- "typescript": "^5.6.3"
66
+ "react-native": "0.76.5",
67
+ "react-native-builder-bob": "^0.35.2",
68
+ "typescript": "^5.7.2"
69
69
  },
70
70
  "codegenConfig": {
71
71
  "name": "RNEdgeToEdge",
package/src/expo.ts CHANGED
@@ -4,17 +4,29 @@ import {
4
4
  withAndroidStyles,
5
5
  } from "@expo/config-plugins";
6
6
 
7
- type Theme = "Material2" | "Material3";
7
+ type Theme =
8
+ | "Default"
9
+ | "Material2"
10
+ | "Material3"
11
+ | "Light"
12
+ | "Material2.Light"
13
+ | "Material3.Light";
14
+
8
15
  type Props = { android?: { parentTheme?: Theme } } | undefined;
9
16
 
10
17
  const withAndroidEdgeToEdgeTheme: ConfigPlugin<Props> = (
11
18
  config,
12
19
  props = {},
13
20
  ) => {
14
- const themes: Record<string, string> = {
21
+ const themes: Record<Theme, string> = {
22
+ Default: "Theme.EdgeToEdge",
15
23
  Material2: "Theme.EdgeToEdge.Material2",
16
24
  Material3: "Theme.EdgeToEdge.Material3",
17
- } satisfies Record<Theme, string>;
25
+
26
+ Light: "Theme.EdgeToEdge.Light",
27
+ "Material2.Light": "Theme.EdgeToEdge.Material2.Light",
28
+ "Material3.Light": "Theme.EdgeToEdge.Material3.Light",
29
+ };
18
30
 
19
31
  const ignoreList = new Set([
20
32
  "android:enforceNavigationBarContrast",
@@ -39,7 +51,7 @@ const withAndroidEdgeToEdgeTheme: ConfigPlugin<Props> = (
39
51
  config.modResults.resources.style = config.modResults.resources.style?.map(
40
52
  (style): typeof style => {
41
53
  if (style.$.name === "AppTheme") {
42
- style.$.parent = themes[parentTheme] ?? "Theme.EdgeToEdge";
54
+ style.$.parent = themes[parentTheme] ?? themes["Default"];
43
55
 
44
56
  if (style.item != null) {
45
57
  style.item = style.item.filter(