Answer the question
In order to leave comments, you need to log in
Explain why IDEA crossed out the line?
Good!
Actually, I set the text color in the adapter, I want it to use resources, it works, but I don’t understand why it looks like this
Answer the question
In order to leave comments, you need to log in
This is a deprecated method. Use ContextCompat.getColor(context, R.color.your_color);
IDEA highlights methods that oracle doesn't recommend using because of major flaws.
This method is marked as deprecated in the annotations, as decided by Google, the author of the Android OS. They love it, the "watchman syndrome" and the syndrome of unfinished actions are the characteristic features of this ecosystem.
It's best to avoid using these methods, but it will compile, and will likely work, if the device is not on a very new OS version.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question