I'm currently creating an Android-app using Xamarin.Forms. I'm trying to implement a settings menu where the user can choose which theme he/she wants to use (system default/light/dark). The system default works fine and dark theme and light theme work as expected.
See images: Light theme Dark theme
The problem I'm having however is that I seem to be unable to set the app to dark mode manually. What I mean by that is that I'm able to change the colors of e.g. the background and text, but not the color of the background for the DisplayAlert or placeholder text.
I tried using Application.Current.UserAppTheme = OSAppTheme.Dark;
but this doesn't seem to do anything (I checked that it was actually set by printing Application.Current.UserAppTheme
to the console). What am I missing here? How do I set dark theme manually so that dialog boxes look like the one shown in the image above.
Any help would be appreciated.
Finn