I have a Xamarin app where I use DisplayAlert() and I have noticed that it, more often than not, will display alerts in light mode, even when I am in dark mode. While debugging, I checked the values of App.Current.UserAppTheme, App.Current.RequestedTheme, AppInfo.RequestedTheme and they were all set to dark, yet my alert still displays in light mode. I don't have access to an IOS device so I'm not sure if this is only happening on Android, but that is what I'm testing with. Has anyone come across this problem and know how to fix it? Thanks in advance.
Xamarin: Default Display Alert background colour doesn't always follow app theme
70 Views Asked by codybchaplin At
1
There are 1 best solutions below
Related Questions in XAMARIN
- Xamarin Table View Crash
- How to read a characteristic (e.g. in WICED Smart example "speed_test")
- Using Azure MobileServices library with my own LAN WebApi
- Bundle Multiple Xamarin apps in one pkg installer
- Xamarin Google Cloud Messaging GcmClient.CheckDevice(this) causes runtime error
- UIAlertView popup won't let me swipe up Control Center
- How do I Insert a Previously Created SQLite Database into a Xamarin.Android App?
- Can custom text be added to a listview cell?
- How to run a ASP.net project to Xamarin Studio
- How can i do a fill animation in Xamarin.Forms
- How to change Display Alert default focus on a button?
- Mixing a CocosSharp game with UIViewControllers
- Building C# code in VSCode on Mac
- How to use research Kit framework in Xamarin
- Why is my app requesting permissions I didn't ask for?
Related Questions in XAMARIN.FORMS
- I need a event for the slider it should fire only if user ends touching the control
- Xamarin Forms - Show Cancel button in toolbar items instead of Back (iOS)
- How can i do a fill animation in Xamarin.Forms
- Visual Studio 2013 crashes when writing opening angle bracket
- How to change Display Alert default focus on a button?
- How to use research Kit framework in Xamarin
- xamarin.forms.labs ImageButton issue
- Can I generate an appx with a windows phone project?
- How Can I Change Height in ViewCell
- Xamarin Android Crash on Start "Got a SIGSEGV"
- When does Xamarin Forms trigger binding?
- Xamarin.forms : How to show the downstate of button which is having background image
- Xamarin.Forms Maps crashing app
- How to hide out a layout in Xamarin.forms C#?
- ListView Header and Footer not appearing
Related Questions in DARKMODE
- Tailwind css dark mode does not enable
- how to disable device dark mode support in react native app
- Android - System doesn't recognize my theme as dark mode
- Why does reading localStorage values require a page refresh to show CSS changes toggled by jQuery?
- How to assign css to javascript which have two or more selectors
- traitCollectionDidChange not called on scheduled appearance (dark mode / light mode) change (e.g. at sunset / sunrise, or custom schedule)
- Dark mode discrepancy in file dialogs in Windows Forms (.NET)
- how to show a particular image (using display) in dark mode on GMAIL in email templates
- Dark mode map in GMap.NET
- Make PyQt application consistently react to system dark mode
- How do I make react-pdf render a pdf for dark mode?
- Unable to Dynamically Change Primary Color in Less at Runtime
- android compose - wont switch dark/light mode with toggle
- why there is error when set function in function's arguments?
- Implementing custom dark mode in angular with scss base file
Related Questions in DISPLAYALERT
- Xamarin: Default Display Alert background colour doesn't always follow app theme
- Xamarin Forms: DisplayAlert background tap firing the cancel event
- Change the text color of Xamarin Forms Prompt Entry
- MAUI: NullReferenceException when DisplayAlert in Android Emulator
- How can you DisplayAlert from a .NET Maui ContentView?
- xamarin ListView den id alma olayı
- Net 7 - How to get async function (which is called inside sync function) block the code execution until its done
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
So I used a combination of these two resources: one and two
In
MainActivity.cs, I added the override below which forces the android theme to update with a style I added as suggested in the accepted answer of two. Note: I usedAppInfo.RequestedThemeinstead ofApplication.Current.RequestedThemeas it was usually incorrect in my case.