Fixed navigation white background

This commit is contained in:
Arnaud Vergnet 2020-04-22 21:37:40 +02:00
parent 3a3cf200f5
commit 65ba27ea26

15
App.js
View file

@ -18,6 +18,7 @@ import ConnectionManager from "./src/managers/ConnectionManager";
import URLHandler from "./src/utils/URLHandler"; import URLHandler from "./src/utils/URLHandler";
import {setSafeBounceHeight} from "react-navigation-collapsible"; import {setSafeBounceHeight} from "react-navigation-collapsible";
import {enableScreens} from 'react-native-screens'; import {enableScreens} from 'react-native-screens';
import {View} from "react-native-animatable";
// Native optimizations https://reactnavigation.org/docs/react-native-screens // Native optimizations https://reactnavigation.org/docs/react-native-screens
enableScreens(); enableScreens();
@ -190,12 +191,14 @@ export default class App extends React.Component<Props, State> {
} else { } else {
return ( return (
<PaperProvider theme={this.state.currentTheme}> <PaperProvider theme={this.state.currentTheme}>
<NavigationContainer theme={this.state.currentTheme} ref={this.navigatorRef}> <View style={{backgroundColor: ThemeManager.getCurrentTheme().colors.background, flex: 1}}>
<MainNavigator <NavigationContainer theme={this.state.currentTheme} ref={this.navigatorRef}>
defaultHomeRoute={this.defaultHomeRoute} <MainNavigator
defaultHomeData={this.defaultHomeData} defaultHomeRoute={this.defaultHomeRoute}
/> defaultHomeData={this.defaultHomeData}
</NavigationContainer> />
</NavigationContainer>
</View>
</PaperProvider> </PaperProvider>
); );
} }