getResources().getColor() is deprecated [duplicate]

Using:
buildToolsVersion "22.0.1" ,
targetSdkVersion 22 in my gradle file.

I found that the useful getResources().getColor(R.color.color_name) is deprecated.

What should I use instead?

4 s
4

Leave a Comment