How can I change all my buttons text color?
I know I can set the background color like follows :
<style name="AppTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
...
<item name="colorButtonNormal">@color/buttonColor</item>
</style>
How can I do this for the button Text?
For anyone that stumbles onto this, I recommend checking out a similar question about Material Design Button Styles. With a theme, your "accent color" will be used to color your button.
android:textColor This should help you change the text color globally. I hope this is helpful ThankYou
If you just need to change the text colour of buttons. You can modify the
textAppearanceButton
style attribute of your main theme.And declare your new textAppearance style as follows
Just using
AppCompatButton
by setting this attribute :And make sure your activity extends AppCompatActivity. I just use it in my project. It works like a charm in both 5.X and pre-5.X.