-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathApp.js
More file actions
executable file
·82 lines (75 loc) · 2.2 KB
/
App.js
File metadata and controls
executable file
·82 lines (75 loc) · 2.2 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
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
import React, { Component } from "react";
import { Text, View } from "react-native";
import Icon from "react-native-vector-icons/Ionicons";
import { createBottomTabNavigator, createAppContainer } from "react-navigation";
import Library from "./app/views/Library";
import Settings from "./app/views/Settings";
import Player from "./app/views/Player";
import { Colors } from "./app/styles/Colors";
import Home from "./app/views/Home";
import { TripleDotMenu } from "./app/components/TripleDotMenu";
/**
* Some random pages for tab navigation demo
*/
class Test extends Component {
constructor(props) {
super(props);
this.state = {};
}
render() {
return (
/**
* All View should be styled with flexbox in order for player modal to work
*/
<View style={{ height: "100%" }}>
<View>
<Text style={{ fontSize: 50, marginTop: 300, textAlign: "center" }}>
PLAYER TEST
</Text>
</View>
<View style={{ position: "absolute", bottom: 0, width: "100%" }}>
<Player />
</View>
</View>
);
}
}
/**
* Tab Navigation Config.
*/
const BottomNav = createBottomTabNavigator(
{
// trIPEL : { screen: TripleDotMenu },
Home: { screen: Home },
Library: { screen: Library },
Setting: { screen: Settings }
},
{
defaultNavigationOptions: ({ navigation }) => ({
tabBarIcon: ({ focused, horizontal, tintColor }) => {
const { routeName } = navigation.state;
let iconName;
if (routeName === "Home") {
// iconName = `ios-information-circle${focused ? "" : "-outline"}`;
iconName = "ios-home";
} else if (routeName === "Library") {
iconName = "ios-albums";
} else if (routeName === "Setting") {
iconName = "ios-settings";
}
// You can return any component that you like here
return <Icon name={iconName} size={23} color={tintColor} />;
}
}),
tabBarOptions: {
activeTintColor: "#F8F8F8",
inactiveTintColor: Colors.tabIconInactive,
style: {
backgroundColor: Colors.tabNav,
paddingTop: 10
}
}
}
);
const app = createAppContainer(BottomNav);
export default app;