wix / react-native-navigation

A complete native navigation solution for React Native
https://wix.github.io/react-native-navigation/
MIT License
13.04k stars 2.67k forks source link

[v2][Android] Hiding TopBar leaves a gap #4074

Closed Mikunj closed 6 years ago

Mikunj commented 6 years ago

Issue Description

When you set top bar visibility to false it still leaves a gap instead of completely hiding like it does on iOS.

Steps to Reproduce / Code Snippets / Screenshots

topBar: {
    visible: false,
}

You can get around it by doing the following:

topBar: {
    visible: true,
    height: 0,
}

However that is really inconvenient if you have a mix of screens with no top bar and screens with top bars. There is also a slight flicker when you do this.


Environment

support[bot] commented 6 years ago

We use the issue tracker exclusively for bug reports and feature requests. This issue appears to be a general usage or support question. Instead, please ask a question on Stack Overflow with the react-native-navigation tag.

Mikunj commented 6 years ago

@guyca This isn't a question, it's a bug. On version 2.0.2555 setting the visibility of the top bar to false completely hides it (no gap is left), however on 2.0.2571 it hides the bar but there's still a gap left at the top.

Aleksion commented 5 years ago

@Mikunj You're absolutely right it's a bug! And thank you for providing a solution. @guyca why did you close thise?

Kyonru commented 5 years ago

This is happening on version ^2.1.3-patch.2

unfrgivn commented 5 years ago

Still happening on 2.18.5 both with adding height: 0 on my Navigation.setRoot() element component and also inside my individual screens, setting the options at the top:

static get options() {
    return {
        topBar: {
            visible: false,
            height: 0,
        }
    }
}
unfrgivn commented 5 years ago

There must be something stale, bc it happens on my emmulators even when running gradle clean and deleting/reinstalling the app, but it's not happening on my device with an alpha release installed

EskelCz commented 5 years ago

can confirm, still happening on android

vemarav commented 5 years ago

This works on android https://github.com/wix/react-native-navigation/issues/5206#issuecomment-502053359