反向TextAppearance不起作用

时间:2017-03-07 09:40:09

标签: android textview android-theme

我有以下主题:

<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:windowBackground">@color/background</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:textColor">@color/colorPrimaryDark</item>
<item name="android:textColorPrimary">@color/colorPrimaryDark</item>
<item name="android:textColorSecondary">@color/colorPrimaryDark</item>
<item name="android:textColorTertiary">@color/colorPrimaryDark</item>
<item name="android:textColorPrimaryInverse">@android:color/white</item>
<item name="android:textColorSecondaryInverse">@android:color/white</item>
<item name="android:textColorTertiaryInverse">@android:color/white</item>
<item name="android:textColorHintInverse">@android:color/white</item>
<item name="android:windowTranslucentStatus" tools:targetApi="kitkat">true</item>

这是TextView

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/monthly_payment"
    android:textAppearance="@style/TextAppearance.AppCompat.Inverse"/>

但它不起作用。文本颜色仍然使用android:textColor。知道什么是错的吗?

1 个答案:

答案 0 :(得分:0)

尝试实施此处提到的解决方案.. https://code.google.com/p/android/issues/detail?id=78184