V3 Transparent screen background
i need to display a loading animation on top of splash screen, so i thought about creating a transparent screen , but "backgroundColor: "transparent" doesn't work . and the screen has a white background. any idea?
Navigation.setRoot({
root: {
component: {
name: "navigation.loading",
id: "navigation.loading",
options: {
topBar: {
visible: false,
height: 0
},
layout: {
backgroundColor: "transparent",
orientation: ["portrait"]
},
screenBackgroundColor: "transparent",
modalPresentationStyle: "overCurrentContext"
}
}
}
});
Environment
- React Native Navigation version: V3
- React Native version: 0.60.4
- Platform(s) (iOS, Android, or both?): iOS
- Device info (Simulator/Device? OS version? Debug/Release?): ALL
You probably want to show that component in an https://wix.github.io/react-native-navigation/#/docs/top-level-api?id=showoverlaylayout-.
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.
Is it possible at all to set backgroundColor in setRoot?
This doesn't work:
Navigation.setRoot({
root: {
stack: {
children: [{
component: {
name: 'Welcome',
passProps: {
text: 'stack with one child'
}
}
}],
options: {
topBar: {
visible: false,
},
layout: {
backgroundColor: 'red',
},
}
}
}
});
This does work:
Navigation.setDefaultOptions({
layout: {
backgroundColor: '#3c1fa0',
},
})
Navigation.setRoot({
root: {
stack: {
children: [{
component: {
name: 'Welcome',
passProps: {
text: 'stack with one child'
}
}
}],
options: {
topBar: {
visible: false,
},
}
}
}
});