-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
55 lines (49 loc) · 1.29 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import React, {Fragment} from 'react';
import AppWrapper from './AppWrapper';
import {
StyleSheet,
I18nManager,
SafeAreaView,
StatusBar,
Platform,
LogBox,
} from 'react-native';
//import changeNavigationBarColor from 'react-native-navigation-bar-color';
import { enableScreens } from 'react-native-screens';
enableScreens();
LogBox.ignoreLogs(['RCTRootView cancelTouches']);
class App extends React.Component {
constructor(props) {
super(props);
this.state = {};
}
renderNavigationBars = () => {
//changeNavigationBarColor('#eaeed3', true);
return Platform.select({
android: <StatusBar backgroundColor="#4b5320" animated />,
ios: <StatusBar barStyle="light-content" showHideTransition="fade" />,
});
};
render() {
return (
<Fragment>
<SafeAreaView style={styles.topNavBarIOS} />
<SafeAreaView style={styles.bottomNavBar}>
{this.renderNavigationBars()}
<AppWrapper />
</SafeAreaView>
</Fragment>
);
}
}
export default App;
const styles = StyleSheet.create({
topNavBarIOS: {
flex: 0,
backgroundColor: '#4b5320'
},
bottomNavBar: {
flex: 1,
//backgroundColor: '#eaeed3' // this changes IOS bottom nav color, for Android, react-native-navigation-bar-color is needed
}
})