Is it possible to have the textview load colors from xml based on its value. I did have a look at states but that didn't fulfill my needs. Let's say the background would change from red to green based on decimal value for the text (rating) ... zomato style ..
Any help is appreciated
i did try :
if (text < 1)
holder.text.setTextColor(Color.RED);
And checks based on values to choose colors. But I would like to know if this can be done using xml and having a gradient.