getColor(int)
is deprecated .
How can I use getColor(int, theme theme)
?
I used some lessons and I can't found how I can use getColor(int, theme theme)
.
Use something as
ResourcesCompat.getColor(getResources(), R.color.red, null)
(Prior to API level 23 the theme will not be applied, so it may be null
.)