Cannot resolve symbol 'colotFilter'

51 Views Asked by At

I have been using the following function to set color filter, but recently I have seen that it is deprecated. This was what I was using and was working fine: public void setColorFilter (int color, PorterDuff.Mode mode)

In order to solve that deprecated method, I have been searching for information to replace this deprecated function and I have come across with this answer: answer that apparently replaces this deprecated method

In that awnser, it says to use the following method:

mydrawable.colorFilter = BlendModeColorFilterCompat.createBlendModeColorFilterCompat(color, BlendModeCompat.SRC_ATOP)

It seems to be a good solution, but my problem is that I don´t know why the "colorFilter" is highlighted in red and is not being recognized in my project by Android Studio. The following warning is shown when I hover the mouse over it:

Cannot resolve symbol 'colorFilter'

I would appreciate some help, thanks in advance.

0

There are 0 best solutions below