简体   繁体   English

如何使用带有React Native的Navigator创建静态底栏?

[英]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. 谢谢。

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

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