Issue
I am a student trying to learn app development with android studio. For my first project, im just building a basic calculator app. I have stumbled across a problem that I couldnt solve and didnt find a helpfull post about. It occurs when I trun on dark mode on the virtual device. Here are 2 pictures showing what happens.
My activity_main.xml consists of some buttons that all have the same style and a TextView. I left all the other files untouched. Id love some advice on how to fix this. Thanks for reading!
Solution
You are most likely using the following default DayNight theme in your themes.xml
file (values/themes/themes.xml)
<style name="Theme.MyApp" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
If you don't want things to change in night mode, you can change that to use the Light theme instead
<style name="Theme.MyApp" parent="Theme.MaterialComponents.Light.DarkActionBar">
and delete the themes.xml (night)
file if it exists. There is some extra info about these options here
Answered By - Tyler V
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.