Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate navbar after upgrade #2908

Closed
luizguilhermefr opened this issue Feb 27, 2018 · 1 comment
Closed

Duplicate navbar after upgrade #2908

luizguilhermefr opened this issue Feb 27, 2018 · 1 comment

Comments

@luizguilhermefr
Copy link

Version

Expected behaviour

I work with react-native-router-flux for some months, with v3. Now, after upgrade to v4 and make some adjusts, I cannot get rid of a weird space in top of my screen.

My code is like:

const RouterWithRedux = connect()(Router)

export default class NavigationRouter extends Component {
  render () {
    return (
      <RouterWithRedux>
        <Drawer
          drawerIcon={NavItems.menu}
          renderLeftButton={NavItems.menu}
          navigationBarStyle={Styles.navBar}
          renderTitle={NavItems.defaultNav}
        >
          <Scene
            key='home'
            component={HomeScreen}
            renderTitle={NavItems.logo}
            initial
          />
    </Drawer>
</RouterWithRedux>

This should render the initial screen normally, with the navbar, hamburger, etc.

Actual behaviour

image

I get this "empty space" between screen content and navbar. If I add hideNavBar to the Scene, it hides the NavBar but the space keeps. Any light? What am I doing wrong?

@luizguilhermefr
Copy link
Author

Figured out that the problem was:

Before upgrade I used to have a "marginTop" attribute in my screen, so the content doesn't get rendered below the navBar, because the reference was the StatusBar.

Seems like in V4 the reference is not the StatusBar anymore, but the NavBar itself, making this margin not useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant