[英]How can I make a static bottom bar using Navigator with React Native?
I'm using the Navigator which renders a Nav Bar and a Scene. 我正在使用导航器来渲染导航栏和场景。
I've put the Bottom Nav Tray into the scene (as returned by renderScene
) because I didn't know where else to put it. 我已将底部导航托盘放入场景中(由renderScene
返回),因为我不知道在哪里放置它。
The problem as you can see from the GIF is that react duplicates and animates the bottom bar too, creating a weird effect. 从GIF可以看出,问题是反应重复,并为底栏设置动画,产生奇怪的效果。
Wrapping the Navigator
in a View
so I can add the Bottom Nav Tray as a sibling caused nothing to be rendered (seems like Navigator
doesn't like to be wrapped). 在View
包装Navigator
,这样我就可以添加底部导航托盘作为兄弟,导致无法渲染(似乎Navigator
器不喜欢被包裹)。
How can I have a static bottom nav bar which isn't part of the transition animation? 如何才能有一个静态底部导航栏,它不是过渡动画的一部分? Thanks. 谢谢。
Did you see RN Examples. 你看到了RN的例子吗? https://github.com/facebook/react-native/tree/master/Examples/UIExplorer ? https://github.com/facebook/react-native/tree/master/Examples/UIExplorer ?
Also I found this article https://medium.com/@dabit3/react-native-navigator-experimental-part-3-adding-tabs-28a2c57356b6#.dmfu9zya9 我还发现了这篇文章https://medium.com/@dabit3/react-native-navigator-experimental-part-3-adding-tabs-28a2c57356b6#.dmfu9zya9
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.