-
Notifications
You must be signed in to change notification settings - Fork 71
Closed
Description
First and Foremost:
Thank you so much for this awesome library... I sincerely appreciate all the hard work you've put into it!
Platform (please complete the following information):
- OS: Both
- Device: iPhone 11 simulator running 13.2; Android Pixel 2 emulator running 10.0/API 29
- Xamarin.Forms: [4.2.0.815419 and 4.4.0.991265]
Describe the bug
In my efforts to implement Dark Mode support for Android and iOS along with a Sharpnado tab bar, I've found that the tab bar does not seem to update its color after it is initially set, while other components do update.
To Reproduce -- Short version
- Grab my modified Sharpnado sample here.
- When you run the app on an iOS or Android device that supports dark mode, try switching from light to dark. Notice that the ContentPage will update to a new color, but the tab bar remains in the original light color.
- See this gif for a look at a demo on an iOS simulator running iOS 13.2.
The long version of how to reproduce:
In my sample project (link below), I'm using the standard Sharpnado sample app with the following modifications:
- Added a dependency service to find out whether the phone is in light or dark mode (IDeviceThemeService, DeviceThemeService_Android, DeviceThemeService_iOS).
- Added code to App.xaml.cs to set the app theme from OnStart and OnResume (SetAppThemeAsync).
- Moved all styles from App.xaml to Styles/ThemeIndependent.xaml.
- Added new ResourceDictionaries called "Styles/LightMode.xaml" and "Styles/DarkMode.xaml". Each of these merges with the ThemeIndependent ResourceDictionary.
- Added one color to the DarkMode and LightMode ResourceDictionaries (key="TabBarBackground").
- Set the BackgroundColor properties of the ContentPage itself and the TabHostView both to be set to "TabBarBackground" as a DynamicResource.
- Run the app on a device (iOS or Android) that supports dark mode. Notice that the ContentPage will change color depending on light/dark mode of the phone, but the tab bar will not.
Exceptions (if applicable)
n/a
Screenshots (if applicable)
- Setting background colors of ContentPage and TabHostView to the same dynamic resource:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels


