Fixed navigation white background

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

3
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}>
<View style={{backgroundColor: ThemeManager.getCurrentTheme().colors.background, flex: 1}}>
<NavigationContainer theme={this.state.currentTheme} ref={this.navigatorRef}> <NavigationContainer theme={this.state.currentTheme} ref={this.navigatorRef}>
<MainNavigator <MainNavigator
defaultHomeRoute={this.defaultHomeRoute} defaultHomeRoute={this.defaultHomeRoute}
defaultHomeData={this.defaultHomeData} defaultHomeData={this.defaultHomeData}
/> />
</NavigationContainer> </NavigationContainer>
</View>
</PaperProvider> </PaperProvider>
); );
} }