How to change default color in all texts in my Android application?

M07 picture M07 · Oct 30, 2012 · Viewed 22k times · Source

I would like to change all color texts in my application. So I wrote this code and I set my theme in the manifest:

<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
    <item name="android:textColor">@color/white</item>
</style>

But only TextView texts are in white. I would like Button and EditText to be in white too.

Can anyone help me? Thank you in advance.

Answer

Ahmad picture Ahmad · Oct 30, 2012

Your Theme:

 <style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
     <item name="android:textColor">@color/white</item>
     <item name="android:buttonStyle">@style/ButtonTheme</item>
  </style>

And this is how you can set your Button Theme:

<style name="ButtonTheme" parent="android:style/Widget.Button">
     <item name="android:textColor">@color/white</item>
</style>

And also do this with EditTexts etc.