-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
93 lines (82 loc) · 2.08 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow strict-local
*/
import {NavigationContainer} from '@react-navigation/native';
import FontAwesome5 from 'react-native-vector-icons/FontAwesome5'
import HomeView from './screens/home';
import settingsScreen from './screens/settings';
import SplashScreen from 'react-native-splash-screen'
import React from 'react';
import {
StyleSheet, PermissionsAndroid
} from 'react-native';
import {createBottomTabNavigator} from '@react-navigation/bottom-tabs'
//registerScreens();
const Tab = createBottomTabNavigator();
function MyTabs() {
return (
<Tab.Navigator
tabBarOptions= {{
inactiveBackgroundColor: '#4D4A4A',
activeTintColor : 'cyan',
inactiveTintColor: 'white',
activeBackgroundColor: '#4D4A4A',
}}
>
<Tab.Screen
name="Home"
component={HomeView}
options = {{
tabBarLabel: "Home",
tabBarIcon : ({color,size}) => (
<FontAwesome5 name="newspaper" color={color} size={size} />
)
}}
/>
{/* <Tab.Screen
name="Sports"
component={sportScreen}
options = {{
tabBarLabel: 'sports',
tabBarIcon : ({color,size}) => (
<FontAwesome5 name="table-tennis" color={color} size={size} />
)
}}
/> */}
<Tab.Screen
name="settings"
component={settingsScreen}
initialParams={{key : 2}}
options = {{
tabBarLabel : "Offline",
tabBarIcon : ({color,size}) => (
<FontAwesome5 name="bookmark" size={size} color={color}/>
)
}}
/>
</Tab.Navigator>
);
}
const App: () => React$Node = () => {
React.useEffect(() => {
SplashScreen.hide()
})
return (
<NavigationContainer>
<MyTabs/>
</NavigationContainer>
);
};
const styles = StyleSheet.create({
custom : {
flex :1,
alignItems: 'center',
justifyContent: 'center',
backgroundColor: 'cyan',
}
});
export default App;