我想更改我的应用程序中的所有彩色文本。 所以我写了这段代码,并在 list 中设置了我的主题:
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<item name="android:textColor">@color/white</item>
</style>
但只有 TextView 文本是白色的。我也希望 Button 和 EditText 也是白色的。
谁能帮帮我?提前谢谢你。
最佳答案
你的主题:
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<item name="android:textColor">@color/white</item>
<item name="android:buttonStyle">@style/ButtonTheme</item>
</style>
这就是设置按钮主题的方法:
<style name="ButtonTheme" parent="android:style/Widget.Button">
<item name="android:textColor">@color/white</item>
</style>
也可以使用 EditTexts 等来完成。
关于android - 如何更改我的 Android 应用程序中所有文本的默认颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13142098/