Skip to content

Commit

Permalink
feat(edge-to-edge): support edge-to-edge Android layout
Browse files Browse the repository at this point in the history
  • Loading branch information
wouterds committed Jul 4, 2023
1 parent 874229c commit b3ca041
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 15 deletions.
34 changes: 20 additions & 14 deletions src/App/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,26 @@ const App = () => {
}, []);

return (
<View style={styles.container}>
<NavigationContainer
theme={{
...DefaultTheme,
colors: {
...DefaultTheme.colors,
background: styles.container.backgroundColor,
},
}}>
<StatusBar barStyle="light-content" />
<DebugInfo />
{!isReady ? <Screen.Splash /> : <Navigation />}
</NavigationContainer>
</View>
<>
<StatusBar
barStyle="light-content"
translucent
backgroundColor="transparent"
/>
<View style={styles.container}>
<NavigationContainer
theme={{
...DefaultTheme,
colors: {
...DefaultTheme.colors,
background: styles.container.backgroundColor,
},
}}>
<DebugInfo />
{!isReady ? <Screen.Splash /> : <Navigation />}
</NavigationContainer>
</View>
</>
);
};

Expand Down
2 changes: 2 additions & 0 deletions src/App/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { StyleSheet } from 'react-native';
const styles = StyleSheet.create({
container: {
flex: 1,
width: '100%',
height: '100%',
backgroundColor: '#15181f',
},
});
Expand Down
6 changes: 5 additions & 1 deletion src/screens/Splash/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ import styles from './styles';

const SplashScreen = () => (
<>
<StatusBar barStyle="light-content" />
<StatusBar
barStyle="light-content"
translucent
backgroundColor="transparent"
/>
<View style={styles.container}>
<SafeAreaView style={styles.content}>
<FastImage
Expand Down

0 comments on commit b3ca041

Please sign in to comment.