看起来像嵌套在一个StackNavigator内TabNavigator的,像下面
StackNavigator(
{
Tabs: {
screen: TabNavigator(
{
TabA: {
screen: TabA,
navigationOptions: {
tabBarIcon: <MaterialCommunityIcons name={"account"} />
}
},
TabB: {
screen: TabB,
navigationOptions: {
tabBarIcon: <MaterialCommunityIcons name={"message"} />
}
},
TabC: {
screen: TabC,
navigationOptions: {
tabBarIcon: <MaterialCommunityIcons name={"earth"} />
}
}
},
{
tabBarOptions: {
showLabel: false,
showIcon: true,
style: {
backgroundColor: "white"
}
}
}
),
navigationOptions: {
title: "Notifications"
}
}
},
{
navigationOptions: ({ navigation }) => ({
headerRight: <MaterialCommunityIcons name={"magnify"} size={30} style={{ color: "white" }} />,
headerStyle: {
backgroundColor: "rgb(76, 62, 84)"
},
headerTitleStyle: { color: "white" }
})
}
)
![enter image description here](https://i.stack.imgur.com/XUHWz.jpg)
@Alainlb:有你找到解决方案?我也在为此而苦苦挣扎。当我使用单个组件时,我可以滚动顶部栏。现在我正在使用TabbarNavigator。我没有得到如何实现这一点。你有任何样品。 – Sujit
@Sujit。不,我没有发现这篇文章创建的任何内容。 :如果你找到了,请告诉我。 – AlainIb