-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathApp.js
127 lines (120 loc) · 3.57 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
import * as React from 'react';
import { Text, View, StyleSheet } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import { createDrawerNavigator } from '@react-navigation/drawer';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { MaterialCommunityIcons } from '@expo/vector-icons';
import estilos from './estilo';
import ListTypes from './components/ListTypes';
import InformationTypes from './components/InformationTypes';
import Hash from './components/Hash';
import FEC from './components/FEC';
import LDDE from './components/LDDE';
const Tab = createBottomTabNavigator();
class MyTabs extends React.Component {
render() {
return (
<Tab.Navigator
screenOptions={({ route }) => ({
tabBarIcon: ({ focused, color, size }) => {
let iconName;
if (route.name === 'Estruturas') {
iconName = focused ? 'circle' : 'circle-outline';
} else if (route.name === 'Informações') {
iconName = focused
? 'comment-question'
: 'comment-question-outline';
}
return (
<MaterialCommunityIcons
name={iconName}
size={size}
color={color}
/>
);
},
})}
tabBarOptions={{
activeTintColor: '#aca344',
inactiveTintColor: 'white',
style: {
borderWidth: 0.5,
borderBottomWidth: 1,
backgroundColor: '#00857E',
borderTopLeftRadius: 20,
borderTopRightRadius: 20,
borderColor: '00857E',
},
}}>
<Tab.Screen name="Estruturas" component={ListTypes} />
<Tab.Screen name="Informações" component={InformationTypes} />
</Tab.Navigator>
);
}
}
const Stack = createStackNavigator();
export default function App() {
return (
<NavigationContainer style={estilos.container}>
<Stack.Navigator initialRouteName="Home">
<Stack.Screen
name="Home"
component={MyTabs}
options={{
title: 'Lista de Estruturas',
headerStyle: {
backgroundColor: 'white',
},
headerTintColor: '#232425',
headerTitleStyle: {
fontWeight: 'bold',
},
}}
/>
<Stack.Screen
name="FEC"
component={FEC}
options={{
title: 'Fila Estática Circular',
headerStyle: {
backgroundColor: '#070082',
},
headerTintColor: 'white',
headerTitleStyle: {
fontWeight: 'bold',
},
}}
/>
<Stack.Screen
name="LDDE"
component={LDDE}
options={{
title: 'Lista Dinâmica Duplamente Encadeada',
headerStyle: {
backgroundColor: '#070082',
},
headerTintColor: 'white',
headerTitleStyle: {
fontWeight: 'bold',
},
}}
/>
<Stack.Screen
name="Hash"
component={Hash}
options={{
title: 'Tabela Hash',
headerStyle: {
backgroundColor: '#070082',
},
headerTintColor: 'white',
headerTitleStyle: {
fontWeight: 'bold',
},
}}
/>
</Stack.Navigator>
</NavigationContainer>
);
}