matusalem
matusalem

Reputation: 2531

Integrate TabNavigator bar into StackNavigator header in React navigation

I would like to have TabNavigator bar under the StackNavigator header like in android settings...

enter image description here

So I put TabNavigator inside StackNavigator and the result is annoying elevation of StackNavigator header...

enter image description here

Does anybody know how to get rid of that elevation without affecting ios side?

Upvotes: 0

Views: 367

Answers (1)

matusalem
matusalem

Reputation: 2531

I found the solution in setting of StackNavigator style. See elevation property. But it is working only up to react-navigation version 1.0.0-beta.7

StackNavigator.navigationOptions = {
  title: 'Blabla',
  header: {
    tintColor: Colors.navbarTintColor,
    style: {
      elevation: 0,
      backgroundColor: Colors.surfacePrimary,
    },
    right: this.renderContexMenu(),
  },
}

Late versions uses headerStyle instead header

Upvotes: 1

Related Questions