-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathApp.js
More file actions
57 lines (54 loc) · 1.39 KB
/
App.js
File metadata and controls
57 lines (54 loc) · 1.39 KB
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
import React, { Component } from 'react';
import { Ionicons } from '@expo/vector-icons';
import { TabNavigator, TabBarBottom } from 'react-navigation';
import {styles} from "./js/styles";
import FileList from './js/fileList';
import Viewer from './js/viewer';
export default TabNavigator(
{
Files: {
screen: FileList,
},
Viewer: {
screen: Viewer,
},
/*
Settings: {
screen: SettingsScreen,
},
*/
},
{
navigationOptions: ({ navigation }) => ({
tabBarIcon: ({ focused }) => {
const { routeName } = navigation.state;
let iconName;
switch (routeName) {
case 'Files':
iconName = `ios-information-circle${focused ? '' : '-outline'}`;
break;
case 'Viewer':
iconName = `ios-link${focused ? '' : '-outline'}`;
break;
case 'Settings':
iconName = `ios-options${focused ? '' : '-outline'}`;
}
return (
<Ionicons
name={iconName}
size={28}
style={{ marginBottom: -3 }}
color={focused ? styles.tabIcon_Selected : styles.tabIcon}
/>
);
},
}),
tabBarOptions: {
style: { backgroundColor: styles.tabBackgroundColor }
},
tabBarComponent: TabBarBottom,
tabBarPosition: 'bottom',
animationEnabled: false,
swipeEnabled: false,
}
);