react-native-navigation
react-native-navigation copied to clipboard
[v3][Android] Using mergeOptions to update bottomTabs backgroundColor doesn't work after switching device theme
🐛 Bug Report
I am seeing this bug after switching themes and trying to mergeOptions
and setDefaultOptions
to change topBar
/bottomTabs
appearance, mainly color. The use case is that for light and dark themes I want different colors for topBar
and bottomTabs
backgrounds. Generally it works as expected for both. In the case where I switch the device theme for example from light to dark, the topBar
side works as expected and background color gets updated, however bottomTabs
background color doesn't get updated and that property seems to be unresponsive. I tried calling mergeOptions
after switching theme on a button press, for example the visible
property works, but backgroundColor
does nothing. Also may be worth mentioning that it all works as expected on iOS and it always gets updated.
To Reproduce
(Write your steps here:)
- Try using
mergeOptions
to switchbottomTabs
background color. - Switch device theme.
- Try step 1 again.
Expected behavior
I would expect the bottomTabs.backgroundColor
to change no matter if the device theme was changed or not.
Actual Behavior
backgroundColor
parameter seems to be unresponsive for bottomTabs
after theme switch.
Your Environment
- React Native Navigation version: 7.29.0
- React Native version: 0.66.0
- Platform(s) (iOS, Android, or both?): Android (API 30 and 31 tested)
- Device info (Simulator/Device? OS version? Debug/Release?): Android Emulator with both Debug and Release builds
I'm seeing a similar problem, but only after toggling dark mode in the Quick Settings menu (swipe down from the top of the screen). Toggling that setting changes the background color to the opposite of the correct one. The same code works correctly on iOS.
If I toggle dark mode in the Settings app, mergeOptions does the right thing.
Still an issue in version 7.37.2 (React Native 0.73.2).