I have the code:
val color = if(...)
android.R.color.darker_gray
else
android.R.color.secondary_text_dark
The value android.R.color.secondary_text_dark is now deprecated in API level 28, it says "Use a text color from your theme instead.". There is a listed constant value and a bracket " 17170437 (0x01060005)", but I cannot understand these these color values as they cannot be put in colors.xml because color hex values should be in the format such as "#ffxxxx".
Can someone tell me what are the meaning of those constant numbers? Is there a different treatment to text color from usual colors? If I want to maintain the same behaviour, how should I extract those color values?
After digging further, I realized that
android.R.color.secondary_text_darkis actually not a color value, but rather a selector itself in the file name ofsecondary_text_dark.xml:With that, I can copy its content into my
res/animatorfolder, extract all the color values it refers to, and callR.animator.secondary_text_darkfrom my code.