I need to change the background color of a TextView.
the font color using ColorStateList what I can change, but the background color does not accept ColorStateList>
You will need to set the backgroundDrawable for the TextView. I've only done my state lists in XML and it would be something like this:
From what I understand, from the documentation if you want to do the state list in Java code you will need to use the StateListDrawable