Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native Navigation v2 (wix) Disable TopBar

I am using the React-Native-Navigation v2 from wix (NOT React-Navigation). I tried disabling the topBar which is rendered by default.

I used following options and am rendering 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.

Is there a way to disable the topBar ?

Best regards

like image 297
tabulaR Avatar asked Jun 24 '18 15:06

tabulaR


1 Answers

I added animate: false to the defaultOptions and removed _height

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

this worked for me and doesn't show the animating on tabchange

like image 134
tabulaR Avatar answered Oct 13 '22 05:10

tabulaR