Button is a TextView and you can call button.setTextColor(someColorStateList)
on a TextView.
Here is how to do it programmatically:
ColorStateList colorStateList = new ColorStateList(
new int[][]{
new int[]{R.attr.state_pressed},
new int[]{R.attr.state_selected},
new int[]{-R.attr.state_selected},
},
new int[]{
Color.GREEN,
Color.BLUE,
Color.RED});
TextView textView = ... some textView or button
textView.setTextColor(colorStateList);
You can of course do the same with xml configuration (define your colorStateList in xml and associate it with the button text color property android:textColor="@drawable/mycolorstatelist"