I have weird problem with ImageView on android 5(api 21). When I set ImageView tint color in xml then I can’t change it on code!!! I tried several ways to change the colorFilter of ImageView programmatically but it doesn’t work. I have this problem only on api 21. Any idea?
After searching lots of hours i found out this is a bug in api 21 that when you setting initialization tint color to ImageView
or ImageButton
you can't change it in code later.
The best solution is moving initial tint color to code to prevent this issue.