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 d892b2f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
3 changes: 1 addition & 2 deletions src/App/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { withSafeAreaContext } from 'hocs';
import ms from 'ms';
import { Navigation } from 'navigation';
import React, { useEffect, useState } from 'react';
import { LogBox, StatusBar, View } from 'react-native';
import { LogBox, View } from 'react-native';
import Config from 'react-native-config';
import Screen from 'screens';
import { withStore } from 'store/withStore';
Expand Down Expand Up @@ -40,7 +40,6 @@ const App = () => {
background: styles.container.backgroundColor,
},
}}>
<StatusBar barStyle="light-content" />
<DebugInfo />
{!isReady ? <Screen.Splash /> : <Navigation />}
</NavigationContainer>
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
23 changes: 10 additions & 13 deletions src/screens/Splash/index.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
import React, { memo } from 'react';
import { ActivityIndicator, StatusBar, View } from 'react-native';
import { ActivityIndicator, View } from 'react-native';
import FastImage from 'react-native-fast-image';
import { SafeAreaView } from 'react-native-safe-area-context';

import styles from './styles';

const SplashScreen = () => (
<>
<StatusBar barStyle="light-content" />
<View style={styles.container}>
<SafeAreaView style={styles.content}>
<FastImage
source={require('resources/images/logo.png')}
style={styles.logo}
/>
<ActivityIndicator style={styles.loader} size="large" />
</SafeAreaView>
</View>
</>
<View style={styles.container}>
<SafeAreaView style={styles.content}>
<FastImage
source={require('resources/images/logo.png')}
style={styles.logo}
/>
<ActivityIndicator style={styles.loader} size="large" />
</SafeAreaView>
</View>
);

export default memo(SplashScreen);

0 comments on commit d892b2f

Please sign in to comment.