Top.js
1.81 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
import React, { Component } from 'react';
import { StyleSheet, Text, View, Image,
TouchableOpacity, ScrollView,
SafeAreaView, StatusBar,Dimensions } from 'react-native';
import { createAppContainer,createSwitchNavigator, createNavigationContainer, withNavigation} from 'react-navigation';
import { createMaterialTopTabNavigator} from 'react-navigation-tabs';
import {createStackNavigator } from 'react-navigation-stack';
import MainTab from '../TopTabNavigator/MainTab'
import CouponTab from '../TopTabNavigator/CouponTab'
import StampTab from '../TopTabNavigator/StampTab'
import MenuTab from '../TopTabNavigator/MenuTab'
import MoreTab from '../TopTabNavigator/MoreTab'
const AppTabNavigator = createStackNavigator({
store: { screen: MainTab },
coupon: { screen: CouponTab },
stamp: { screen: StampTab },
menu: { screen: MenuTab },
"···": { screen: MoreTab },
}, {
animationEnabled: true,
swipeEnabled: true,
tabBarOptions: {
style: {
...Platform.select({
ios:{
backgroundColor:'white',
height:50
},
android:{
backgroundColor:'white',
height:50,
}
})
},
indicatorStyle: {
backgroundColor:"transparent"
},
activeTintColor: '#000',
inactiveTintColor: '#000',
upperCaseLabel: false,
showLabel: true,
showIcon: false,
}
});
AppTabNavigator.navigationOptions = {
tabBarLabel: 'Home!',
};
const App = createStackNavigator({
MyTab: {
screen: AppTabNavigator,
navigationOptions: {
headerLeft:() =>null,
header:()=> null,
headerRight:() => null,
headerTitleStyle: {flex: 1, textAlign: 'center'}
},
},
})
export default createAppContainer(App);