如何更改所有文本默认颜色在我的Android应用程序? [英] How to change default color in all texts in my Android application?
本文介绍了如何更改所有文本默认颜色在我的Android应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想改变所有颜色的文本在我的应用程序。 所以我写了这个code和设置我在清单中的主题:
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>
但只有TextView的文字为白色。我想按钮和的EditText是在白色的了。
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.
推荐答案
你的主题:
<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>
和也与EditTexts等做到这一点。
And also do this with EditTexts etc.
这篇关于如何更改所有文本默认颜色在我的Android应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文