我希望我的应用中的每个文本都是白色的。Android主题不会影响任何内容
这是我做过什么:
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<!--
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Light">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<item name="android:textAppearance">@style/MyTextViewStyle</item>
</style>
<style name="MyTextViewStyle" parent="@android:style/TextAppearance">
<item name="android:textColor">#FFFFFFFF</item>
</style>
而且在清单中我设置了application
标签的这个属性:android:theme="@style/AppTheme"
为什么不会文本颜色的变化?
您是否已经在“TextView”上设置了颜色?这将覆盖这里的颜色。 –
你可以发布你的xml的textview吗?在TextView中设置“style =”@ style/MyTextViewStyle“并且不要在TextView标签中设置textColor –
我不会在文本视图上手动更改颜色,而且我不想直接设置样式..我希望它自动应用于所有文本视图 –