Issue
I have a few textViews with a property android:textColor="@color/textColor"
.
Color textColor
is defined in two files: colors.xml and colors-night.xml
#000000 and #4183d7 respectively.
I allow users to change app theme:
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
But if mobile is set to night mode and user tries to set the app to light mode, all textViews become white (howewer it must be black)
Solution
If dark mode is enabled on a phone, but not in your app - system applies color inversion. To disable it, we need to use android:forceDarkAllowed="false"
Answered By - Laughing_Man
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.