我想为整个应用程序设置特定的文本颜色。我已经定义了我的风格,但不知道出了什么问题..
我已经定义了我自己的风格:
<style name="ActionBarTheme" parent="android:Theme">
<item name="android:textAppearance">@style/TextAppearance</item>
</style>
对于文本外观
<style name="TextAppearance" parent="@android:style/TextAppearance">
<item name="android:textColor">@color/TextColor</item>
</style>
并在 list 中设置 ActionBarTheme
任何帮助..
最佳答案
您可以使用 TextView.getTextColors().getDefaultColor() 来设置默认文本颜色。其实我从来没有用过这个,但我认为它可能对你有帮助。
风格
<style name="TextColor">
<item name="android:textColor">#00FF00</item>
</style>
然后在布局文件中
<TextView style="@style/TextColor" />
谢谢
关于android - 为整个应用程序设置文本颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23167915/