react-native - Combining bottom navigator and top navigator
问题描述
The AppNavigator and TopBarNavigator should be displayed all the time on the app. The problem is that I can't get the topbarnav to show up without adding it to the appNavigator. The problem with that is that it adds an extra tab, which I don't want at the bottom.
const AppNavigator = createBottomTabNavigator(
{
Insights: {screen: Insights},
Incidents: {screen: googleMapsImages},
Plus: {screen: Addhazard},
'Team alerts': {screen: TeamAlerts},
More: {screen: Main},
},{
tabBarOptions: {
activeTintColor: 'green',
inactiveTintColor: 'gray',
},
}
);
const Drawernavigator = createDrawerNavigator(
{
BottomNavigator: {screen: AppNavigator},
Team: {screen: YourTeam},
}
);
const AppContainer = createAppContainer(Drawernavigator);
class App extends Component {
render(){
return (
<View style={styles.container}>
<AppContainer />
</View>
);
}
}
A good example is the app you can download here --> https://safetyculture.com/spotlight/
解决方案
推荐阅读
- mysql - SQL 语句在所有列中搜索关键字
- junit4 - Spring Boot Controller Test with Mock Service 不使用模拟服务
- node.js - node koa REST(打字稿)挂在firebase数据库调用上
- azure-cognitive-search - 单个 Azure 搜索索引中具有不同属性的多个表
- python - 在 Python 中使用 ftplib 包进行异常处理
- python - 如何从多个文本中提取数据并将结果保存到 JSON?
- firebase - Firebase 自定义验证电子邮件
- python - 精选帖子未添加
- .net - Kubernetes 入口路由 HTTP 与 Kestrel
- python - 使用贝叶斯模型预测值并得到错误