I'm developing android application
I have a different background drawable and text color for each status of the button (pressed , normal)
I have created statelistdrawable object to be able to add the background drawable , but my problem now is how to set the text color
can any one help please ?
Button is a TextView and you can call
button.setTextColor(someColorStateList)
on a TextView.Here is how to do it programmatically:
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"