topBar: {
visible: false,
},
The code above on Android does not make the topBar invisible.
There is still a blank space at the origin topBar place.
I must add drawBehind: true
, that will make the screen on IOS move up, and a blank space above bottmTabs
after pop
a screen.
I had the same issue, I think it's a bug.
But I have a workaround for now until it's resolved.
topBar: {
visible: false,
height: 0
},
I had to use _height instead of height. (Android)
topBar: {
visible: false,
_height: 0,
}
https://github.com/wix/react-native-navigation/blob/v2/playground/src/screens/OptionsScreen.js#L54
@ebouJ @pwnreza
height: 0
will cause another problem if a screen pushed from the height: 0
screen, the new screen content will be drawn under topBar.
oh no.. so how did u fix the problem?
I opened a stackoverflow post for this problem.
In a nutshell Im trying to disable the topBar as a whole
https://stackoverflow.com/questions/51011306/react-native-navigation-v2-wix-disable-topbar
@pwnreza about the animation, i think you can add:
topBar: {
visible: false,
drawBehind: true,
animate: false,
},
@sapjax
Thank you very much. Worked for me on Android
same problem, for me worked
topBar: {
visible: false,
drawBehind: true
}
Im having this problem but with setStackRoot on android, it seems to ignore the layout and screen options :/
@Lube same issue for me but you can pass that option to all of the views in your stack.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest version and report back. Thank you for your contributions.
The issue has been closed for inactivity.
using
topBar: {
visible: false,
drawBehind: true
}
as @russelarms said fixed the issue
The reason this happens (thanks @guyca) is because a visible gap where the TopBar would be remains visible. The gap exists because the ReactRootView isn't remeasured.
Since RN 0.54 we can remeasure a RootView
, so this is a bug now.
Can we perhaps reopen this: @guyca ?
@guyca @sapjax When I add options object in component, the application under version 9 stucks on white screen. Below is my code. When I remove code inside topBar, the application works
Navigation.setRoot({
root: {
stack: {
children: [
{
component: {
name: Constants.Screens.SPLASH_SCREEN,
options:{
topBar: {
visible: false,
drawBehind: true,
animate: false,
}
}
}
},
],
options: {
layout: {
orientation: ["portrait"]
}
}
}
},
});
I works fine on android 9
Most helpful comment
@pwnreza about the animation, i think you can add: