0

I've been searching but still am unable to find a way.

How does one change all text button colors (without modifying the android:textColor of other widgets in a scheme?

NB: Does not work

 <!-- Base application theme. -->
  <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <!-- Customize your theme here. -->
    <item name="colorButtonNormal">#1bbc9b</item>
    <!--<item name="android:textColor">#ffffff</item>-->
    <item name="android:buttonStyle">@style/AppTheme.MyButton</item>
  </style>

  <style name="AppTheme.MyButton" parent="@android:style/TextAppearance">
    <item name="android:textColor">#ffffff</item>
  </style>

UPDATE: Fix for just altering button color, not entire button style

jhtong
  • 1,529
  • 4
  • 23
  • 34
  • Please check this link , it may helpful to you. http://stackoverflow.com/questions/2410836/how-do-i-apply-a-style-to-all-buttons-of-an-android-application – Amee May 29 '15 at 07:13
  • Hello @Amee, still does not work.. It is using AppCompat 7.22. – jhtong May 29 '15 at 07:41

1 Answers1

1

This worked for me. In the values/styles.xml, configure:

  <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <item name="colorButtonNormal">#fcfc00</item>
    <!-- more stuff here -->
  </style>
jhtong
  • 1,529
  • 4
  • 23
  • 34