简体   繁体   English

React Native Navigation v2(wix)禁用TopBar

[英]React Native Navigation v2 (wix) Disable TopBar

I am using the React-Native-Navigation v2 from wix (NOT React-Navigation). 我正在使用wix的React-Native-Navigation v2(不提供React-Navigation)。 I tried disabling the topBar which is rendered by default. 我尝试禁用默认情况下呈现的topBar。

I used following options and am rendering bottomTabs: 我使用以下选项并渲染bottomTabs:

Navigation.setDefaultOptions({
  topBar: {
    visible: false,
    _height: 0,
    drawBehind: true,
  },
});

The topBar disapears but shows an drawBehind animation on initial opening of the Tabs of bottomTabs. topBar消失,但在bottomTabs的Tab的初始打开时显示了drawBehind动画。

Is there a way to disable the topBar ? 有没有一种方法可以禁用topBar?

Best regards 最好的祝福

I added animate: false to the defaultOptions and removed _height 我将animate:false添加到defaultOptions并删除了_height

Navigation.setDefaultOptions({
  topBar: {
    visible: false,
    drawBehind: true,
    animate: false,
  }
});

this worked for me and doesn't show the animating on tabchange 这对我有用,并且没有显示tabchange上的动画

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

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