topBar background is white before welcome screen loads
Issue Description
topBar background is white before welcome screen loads
Steps to Reproduce / Code Snippets / Screenshots
I'm doing following on app.js where I import all screens I have:
Navigation.setDefaultOptions({
layout: {
backgroundColor: '#f8a11b'
},
topBar: {
visible: true,
animate: false,
hideOnScroll: false,
drawBehind: true,
elevation: 0,
background: {
color: '#f8a11b'
}
}
});
Thank I have stack in same file App.js:
Navigation.events().registerAppLaunchedListener(() => {
Navigation.setRoot({
root: {
sideMenu: {
left: {
component: {
name: 'myproj.SideDrawer',
id: 'leftSideMenu',
passProps: {
text: 'This is a left side menu screen'
}
}
},
center: {
stack:{
id: 'WelcomeScreen',
children: [
{
component: {
name: 'myproj.WelcomeScreen'
}
}
]
}
}
},
}
});
});
On my welcome screen I have following: on component I have static method which returns screen options and I am returning following options:
static options(passProps) {
return welcomeScreenOptions;
};
export const welcomeScreenOptions = {
layout: {
backgroundColor: '#f8a11b'
},
topBar: {
visible: true,
animate: false,
hideOnScroll: true,
drawBehind: true,
testID: 'topBar',
elevation: 0,
backButton: {
visible: false,
},
title:{
alignment: "center"
},
background: {
color: '#f8a11b'
},
}
}
But anyway when I open the app sometimes(sometimes its the color which I have in options) the headers background is white and than it changes to the color I provide in options)
Environment
- React Native Navigation version: ^2.1.3-patch.2
- React Native version: 0.57.8
- Platform(s) (iOS, Android, or both?): Android
- Device info (Simulator/Device? OS version? Debug/Release?): any device
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 Detox and report back. Thank you for your contributions.
The issue has been closed for inactivity.
I am also experiencing this but with every first screen change.