Skip to content

Commit 6ed95cc

Browse files
Merge pull request #415 from OpenDTU-App/382-integrate-edge-to-edge-to-make-google-happy
2 parents d801ccf + de937c6 commit 6ed95cc

5 files changed

Lines changed: 27 additions & 6 deletions

File tree

android/app/src/main/res/values/styles.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<resources>
22

33
<!-- Base application theme. -->
4-
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
4+
<style name="AppTheme" parent="Theme.EdgeToEdge">
55
<!-- Customize your theme here. -->
66
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item>
77
<item name="android:windowIsTranslucent">true</item>

licenses.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,12 @@
185185
"licenseUrl": "https://github.com/luggit/react-native-config/raw/master/LICENSE",
186186
"parents": "opendtu-react-native"
187187
},
188+
"react-native-edge-to-edge@1.7.0": {
189+
"licenses": "MIT",
190+
"repository": "https://github.com/zoontek/react-native-edge-to-edge",
191+
"licenseUrl": "https://github.com/zoontek/react-native-edge-to-edge/raw/master/LICENSE",
192+
"parents": "opendtu-react-native"
193+
},
188194
"react-native-fast-image@8.6.3": {
189195
"licenses": "(MIT AND Apache-2.0)",
190196
"repository": "https://github.com/DylanVann/react-native-fast-image",

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
"react-native": "0.81.4",
6666
"react-native-charts-wrapper": "^0.6.0",
6767
"react-native-config": "1.5.6",
68+
"react-native-edge-to-edge": "^1.7.0",
6869
"react-native-fast-image": "^8.6.3",
6970
"react-native-flex-layout": "^0.1.5",
7071
"react-native-fs": "^2.20.0",

src/InnerApp.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import type { FC } from 'react';
22
import { useEffect, useMemo, useState } from 'react';
33
import { useTranslation } from 'react-i18next';
44
import Config from 'react-native-config';
5+
import { SystemBars } from 'react-native-edge-to-edge';
56
import type { MD3Theme } from 'react-native-paper';
67
import {
78
adaptNavigationTheme,
@@ -19,7 +20,7 @@ import Toast, {
1920
SuccessToast,
2021
} from 'react-native-toast-message';
2122

22-
import { StatusBar, useColorScheme } from 'react-native';
23+
import { useColorScheme } from 'react-native';
2324

2425
import moment from 'moment/moment';
2526

@@ -310,10 +311,12 @@ const InnerApp: FC = () => {
310311
<PaperProvider theme={theme}>
311312
<AppOfflineModal />
312313
<AppChangelogModal />
313-
<StatusBar
314-
backgroundColor={theme.colors.background}
315-
barStyle={theme.dark ? 'light-content' : 'dark-content'}
316-
animated
314+
<SystemBars
315+
style={{
316+
statusBar: theme.dark ? 'light' : 'dark',
317+
navigationBar: theme.dark ? 'light' : 'dark',
318+
}}
319+
hidden={{ statusBar: false, navigationBar: false }}
317320
/>
318321
<NavigationContainer theme={navigationTheme}>
319322
<NavigationStack />

yarn.lock

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12542,6 +12542,7 @@ __metadata:
1254212542
react-native: "npm:0.81.4"
1254312543
react-native-charts-wrapper: "npm:^0.6.0"
1254412544
react-native-config: "npm:1.5.6"
12545+
react-native-edge-to-edge: "npm:^1.7.0"
1254512546
react-native-fast-image: "npm:^8.6.3"
1254612547
react-native-flex-layout: "npm:^0.1.5"
1254712548
react-native-fs: "npm:^2.20.0"
@@ -13289,6 +13290,16 @@ __metadata:
1328913290
languageName: node
1329013291
linkType: hard
1329113292

13293+
"react-native-edge-to-edge@npm:^1.7.0":
13294+
version: 1.7.0
13295+
resolution: "react-native-edge-to-edge@npm:1.7.0"
13296+
peerDependencies:
13297+
react: "*"
13298+
react-native: "*"
13299+
checksum: 10/26ca09c125ce21b632b1645f23681688630b1bc4d7ad869de74c64328a29fd5300eaf258f1353072016c30a0c236e832e4b19ed42846c48d19898917d4c13112
13300+
languageName: node
13301+
linkType: hard
13302+
1329213303
"react-native-fast-image@npm:^8.6.3":
1329313304
version: 8.6.3
1329413305
resolution: "react-native-fast-image@npm:8.6.3"

0 commit comments

Comments
 (0)