Closed wise-danya closed 2 weeks ago
@wise-danya This is the intended behavior. The only extras customizations allowed on BootTheme
are:
"plugins": [
["react-native-bootsplash", { "android": { "parentTheme": "TransparentStatus" } }]
]
"plugins": [
["react-native-bootsplash", { "android": { "parentTheme": "EdgeToEdge" } }]
]
"plugins": [
["react-native-bootsplash", { "android": { "darkContentBarsStyle": true } }]
]
Everything is in the README.
@zoontek Thank you for the clarification! Now I see what happened - there was a typo in my app.json
.
That's why I had to manually add status/navigation bar colors to get transparent bars during app launch. After fixing the configuration structure, everything works as documented. Sorry for the confusion!
Before submitting a new issue
Bug summary
When using
react-native-bootsplash
with Expo config plugins, any custom styles added toBootTheme
instyles.xml
are completely removed duringexpo prebuild --clean
. The only workaround is to place custom style plugins beforereact-native-bootsplash
in the plugins array, which isn't intuitive and could lead to other issues.Expected Behavior
The plugin should merge existing
BootTheme
styles with its required configurations rather than overwriting them completely. Custom style items that don't conflict with required bootsplash items should be preserved.Library version
Environment info
Steps to reproduce
react-native-bootsplash
BootTheme
(e.g., status bar and navigation bar colors)expo prebuild --clean
styles.xml
Reproducible sample code
Initial
styles.xml
:After
expo prebuild --clean
:Technical Details
The issue is in
withAndroidStyles
plugin implementation where it filters out the existingBootTheme
completely and creates a new one with only the required items:Proposed Solution
Modify the plugin to:
BootTheme
items that don't conflict with required itemsI'm happy to submit a PR with these changes if desired. Thank you!