File tree Expand file tree Collapse file tree 21 files changed +194
-99
lines changed Expand file tree Collapse file tree 21 files changed +194
-99
lines changed Original file line number Diff line number Diff line change @@ -57,15 +57,27 @@ Add the library plugin in your `app.json` config file and [create a new build](h
57
57
}
58
58
```
59
59
60
+ _ 📌 The available plugins options are:_
61
+
62
+ ``` ts
63
+ type Options = {
64
+ android? : {
65
+ // use an edge-to-edge version of `Theme.{MaterialComponents,Material3}.DayNight.NoActionBar`
66
+ parentTheme? : " Material2" | " Material3" ; // optional, default is `undefined` (`Theme.EdgeToEdge`)
67
+ };
68
+ };
69
+ ```
70
+
60
71
> [ !NOTE]
61
72
> This library is not yet supported in the [ Expo Go] ( https://expo.dev/go ) sandbox app.
62
73
63
74
### Bare React Native
64
75
65
- Edit your ` android/app/src/main/res/values/styles.xml ` file to inherit from the provided theme :
76
+ Edit your ` android/app/src/main/res/values/styles.xml ` file to inherit from one of the provided themes :
66
77
67
78
``` diff
68
79
<resources>
80
+ <!-- inherit from Theme.EdgeToEdge / Theme.EdgeToEdge.Material2 / Theme.EdgeToEdge.Material3 -->
69
81
- <style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
70
82
+ <style name="AppTheme" parent="Theme.EdgeToEdge">
71
83
<!-- … -->
Original file line number Diff line number Diff line change @@ -70,4 +70,5 @@ repositories {
70
70
dependencies {
71
71
// noinspection GradleDynamicVersion
72
72
implementation " com.facebook.react:react-native:+" // From node_modules
73
+ implementation " com.google.android.material:material:${ safeExtGet("materialVersion", "1.12.0")} "
73
74
}
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" utf-8" ?>
2
+ <resources >
3
+ <bool name =" windowLightSystemBars" >false</bool >
4
+ </resources >
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" utf-8" ?>
2
+ <resources >
3
+ <bool name =" windowLightSystemBars" >false</bool >
4
+ </resources >
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" utf-8" ?>
2
+ <resources >
3
+ <bool name =" windowLightSystemBars" >true</bool >
4
+ </resources >
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" utf-8" ?>
2
2
<resources >
3
- <style name =" Theme.EdgeToEdge.Base " parent =" Theme.AppCompat.DayNight.NoActionBar " >
4
- <item name =" android:windowLightStatusBar " >true </item >
5
- <item name =" android:windowLightNavigationBar " >true </item >
3
+ <style name =" Theme.EdgeToEdge" parent =" Theme.EdgeToEdge.Common " >
4
+ <item name =" android:windowLightNavigationBar " >@bool/windowLightSystemBars </item >
5
+ <item name =" android:windowLayoutInDisplayCutoutMode " >shortEdges </item >
6
6
</style >
7
7
8
- <style name =" Theme.EdgeToEdge" parent =" Theme.EdgeToEdge.Common" >
8
+ <style name =" Theme.EdgeToEdge.Material2" parent =" Theme.EdgeToEdge.Material2.Common" >
9
+ <item name =" android:windowLightNavigationBar" >@bool/windowLightSystemBars</item >
10
+ <item name =" android:windowLayoutInDisplayCutoutMode" >shortEdges</item >
11
+ </style >
12
+
13
+ <style name =" Theme.EdgeToEdge.Material3" parent =" Theme.EdgeToEdge.Material3.Common" >
14
+ <item name =" android:windowLightNavigationBar" >@bool/windowLightSystemBars</item >
9
15
<item name =" android:windowLayoutInDisplayCutoutMode" >shortEdges</item >
10
16
</style >
11
17
</resources >
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" utf-8" ?>
2
2
<resources >
3
3
<style name =" Theme.EdgeToEdge" parent =" Theme.EdgeToEdge.Common" >
4
+ <item name =" android:windowLightNavigationBar" >@bool/windowLightSystemBars</item >
5
+ <item name =" android:windowLayoutInDisplayCutoutMode" >shortEdges</item >
6
+ <item name =" android:enforceStatusBarContrast" >false</item >
7
+ <item name =" android:enforceNavigationBarContrast" >true</item >
8
+ </style >
9
+
10
+ <style name =" Theme.EdgeToEdge.Material2" parent =" Theme.EdgeToEdge.Material2.Common" >
11
+ <item name =" android:windowLightNavigationBar" >@bool/windowLightSystemBars</item >
12
+ <item name =" android:windowLayoutInDisplayCutoutMode" >shortEdges</item >
13
+ <item name =" android:enforceStatusBarContrast" >false</item >
14
+ <item name =" android:enforceNavigationBarContrast" >true</item >
15
+ </style >
16
+
17
+ <style name =" Theme.EdgeToEdge.Material3" parent =" Theme.EdgeToEdge.Material3.Common" >
18
+ <item name =" android:windowLightNavigationBar" >@bool/windowLightSystemBars</item >
4
19
<item name =" android:windowLayoutInDisplayCutoutMode" >shortEdges</item >
5
20
<item name =" android:enforceStatusBarContrast" >false</item >
6
21
<item name =" android:enforceNavigationBarContrast" >true</item >
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" utf-8" ?>
2
2
<resources >
3
3
<style name =" Theme.EdgeToEdge" parent =" Theme.EdgeToEdge.Common" >
4
+ <item name =" android:windowLightNavigationBar" >@bool/windowLightSystemBars</item >
5
+ <item name =" android:windowLayoutInDisplayCutoutMode" >always</item >
6
+ <item name =" android:enforceStatusBarContrast" >false</item >
7
+ <item name =" android:enforceNavigationBarContrast" >true</item >
8
+ </style >
9
+
10
+ <style name =" Theme.EdgeToEdge.Material2" parent =" Theme.EdgeToEdge.Material2.Common" >
11
+ <item name =" android:windowLightNavigationBar" >@bool/windowLightSystemBars</item >
12
+ <item name =" android:windowLayoutInDisplayCutoutMode" >always</item >
13
+ <item name =" android:enforceStatusBarContrast" >false</item >
14
+ <item name =" android:enforceNavigationBarContrast" >true</item >
15
+ </style >
16
+
17
+ <style name =" Theme.EdgeToEdge.Material3" parent =" Theme.EdgeToEdge.Material3.Common" >
18
+ <item name =" android:windowLightNavigationBar" >@bool/windowLightSystemBars</item >
4
19
<item name =" android:windowLayoutInDisplayCutoutMode" >always</item >
5
20
<item name =" android:enforceStatusBarContrast" >false</item >
6
21
<item name =" android:enforceNavigationBarContrast" >true</item >
You can’t perform that action at this time.
0 commit comments