When you set top bar visibility to false it still leaves a gap instead of completely hiding like it does on iOS.
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.
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.
@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.
@Mikunj You're absolutely right it's a bug! And thank you for providing a solution.
@guyca why did you close thise?
This is happening on version ^2.1.3-patch.2
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,
}
}
}
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
can confirm, still happening on android
This works on android
https://github.com/wix/react-native-navigation/issues/5206#issuecomment-502053359
Most helpful comment
@Mikunj You're absolutely right it's a bug! And thank you for providing a solution.
@guyca why did you close thise?