79151575

Date: 2024-11-02 21:03:58
Score: 0.5
Natty:
Report link

To fix this we had to call this method when starting up the app in OnStart() in App.Xaml.cs and also call this if the user manually changes the theme in the in-app settings

public static void SetActivityColor()
{
#if ANDROID
    var activity = Platform.CurrentActivity;
    activity?.Window?.DecorView?.SetBackgroundColor(
        App.CurrentTheme == AppTheme.Dark ?
        Android.Graphics.Color.Black :
        Android.Graphics.Color.White);
#endif
}

Unsure if this will be needed for IOS

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: F Chopin