react-native-navigation icon indicating copy to clipboard operation
react-native-navigation copied to clipboard

[v3][Android] Using mergeOptions to update bottomTabs backgroundColor doesn't work after switching device theme

Open ernestasgobionis opened this issue 2 years ago • 2 comments

🐛 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:)

  1. Try using mergeOptions to switch bottomTabs background color.
  2. Switch device theme.
  3. 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

ernestasgobionis avatar Oct 07 '22 14:10 ernestasgobionis

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.

brsaylor2 avatar Jul 10 '23 22:07 brsaylor2

Still an issue in version 7.37.2 (React Native 0.73.2).

brsaylor2 avatar Jan 27 '24 01:01 brsaylor2