简体   繁体   English

React Native Navigation - 带有叠加层的嵌套导航器

[英]React Native Navigation - Nested Navigator with Overlay

I'm having a bit of a rough time figuring out how to structure my project.我在弄清楚如何构建我的项目时遇到了一些困难。 I have this MiniPlayer (see 2. pic) that I would like to overlay over all other screens whenever a song is playing.我有这个 MiniPlayer(见 2. pic),我想在播放歌曲时覆盖所有其他屏幕。 So far I solved it this way:到目前为止,我是这样解决的:

在此处输入图片说明

However, adding it like that I can't find a way to navigate from it to another screen since it's not part of any navigator.但是,像这样添加它我找不到从它导航到另一个屏幕的方法,因为它不是任何导航器的一部分。 And I can't really add it to any of the navigators I have.而且我真的无法将它添加到我拥有的任何导航器中。 If I add it to the TabsNav I get an additional tab that I don't want, if I add it to the stack, it's hidden when I open another tab.如果我将它添加到 TabsNav,我会得到一个我不想要的附加选项卡,如果我将它添加到堆栈中,当我打开另一个选项卡时它会被隐藏。 Can anyone give me a hint on how to move forward here or what I'm overlooking?谁能给我一个关于如何在这里前进或我所忽视的提示? Thanks a lot in advance :)非常感谢提前:)

在此处输入图片说明

I think one way to implement this would be using the tabBar prop.我认为实现这一点的一种方法是使用 tabBar 道具。 link 关联

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM