I am currently using ContextCompat.getColorbut not getting the right color. When an application adheres to the night resource qualifier, ContextCompat selects a color from values/colors.xml, rather than values-night/colors.xml.
I have tried apporaches similar to this one https://stackoverflow.com/a/2129609/2129 , using a theme with one residing in values/styles.xmland values-night/styles.xml, but it seems that the color is precompiled using a resource without a qualifier -night.
source
share