如何添加抽屉菜单图标到createMaterialTopTabNavigator?

时间:2019-01-21 11:38:51

标签: react-native

我的应用程序有一个createMaterialTopTabNavigatorcreateDrawerNavigator正常运行,我想向其中添加一个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>
      )
    }
    )

  }
}
);

0 个答案:

没有答案
相关问题