我的应用程序有一个createMaterialTopTabNavigator
和createDrawerNavigator
正常运行,我想向其中添加一个drawerNavigator
菜单图标
createMaterialTopTabNavigator
,但对我不起作用ciuyld
,请帮助,这是我的代码:
const TabBarNavig = createMaterialTopTabNavigator({
screen : Login,
screen2 : Signup,
Dating : Dating
},
{
tabBarOptions: {
scrollEnabled: true,
labelStyle: {
fontSize: 12,
},
tabStyle: {
width: Dimensions.get('window').width / 3,
},
style: {
backgroundColor: '#38A1F3',
height: 80
},
indicatorStyle: {
backgroundColor: '#fff',
},
navigationOptions: ({ navigation }) => ({
title: 'Home Screen',
headerLeft: (
<View style={{flexDirection:'row'}}>
<TouchableOpacity onPress={() => navigation.toggleDrawer()}>
<View style={{ paddingHorizontal: 10 }}>
<Icon name="menu" size={24} style={{color:'#FFF'}} />
</View>
</TouchableOpacity>
<View style={{marginLeft:80}}>
<Image
source={require('./assets/Logo.png')}
style={{width:30,height:30 }}
/>
</View>
</View>
)
}
)
}
}
);