本文介绍了样式不工作与支持库22.1.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我曾经有:
<item name="colorControlNormal">@color/dark_blue</item>
<item name="colorControlActivated">@color/dark_blue</item>
<item name="colorControlHighlight">@color/dark_blue</item>
和它运作良好,直到我的更新支持库22.1.0,现在的颜色是系统默认的。
and it was working well until I updated support library to 22.1.0, now the colors are the system default.
styles.xml
styles.xml
<resources>
<style name="WifiSentinel" parent="@style/Theme.AppCompat.NoActionBar">
<item name="android:windowBackground">@color/light_blue</item>
<item name="android:textAppearance">@style/WifiSentinelTextAppearance</item>
<item name="android:textViewStyle">@style/MyTextViewStyle</item>
<item name="android:textColor">@color/dark_blue</item>
<item name="android:editTextStyle">@style/EditTextStyle</item>
<item name="colorControlNormal">@color/dark_blue</item>
<item name="colorControlActivated">@color/dark_blue</item>
<item name="colorControlHighlight">@color/dark_blue</item>
</style>
<style name="WifiSentinelBarStyle" parent="@style/Widget.AppCompat.Toolbar">
<item name="android:background">@color/dark_blue</item>
<item name="colorControlNormal">@color/white</item>
<item name="colorControlActivated">@color/white</item>
<item name="colorControlHighlight">@color/white</item>
<item name="background">@color/dark_blue</item>
</style>
<style name="EditTextStyle" parent="@style/Widget.AppCompat.EditText">
<item name="colorControlNormal">@color/dark_blue</item>
<item name="colorControlActivated">@color/dark_blue</item>
<item name="colorControlHighlight">@color/dark_blue</item>
</style>
<style name="MyTextViewStyle" parent="android:Widget.TextView">
<item name="android:textAppearance">@style/WifiSentinelTextAppearance</item>
</style>
<style name="WifiSentinelTextAppearance" parent="@android:style/TextAppearance.Medium">
<item name="android:textColor">@color/dark_blue</item>
<item name="android:textSize">15dp</item>
</style>
<style name="WifiSentinelTextAppearance.Large" parent="@style/WifiSentinelTextAppearance">
<item name="android:textSize">18dp</item>
<item name="android:textStyle">bold</item>
</style>
我不知道该怎么做,或者这是一个错误或东西。
I don't know what to do or if this is a bug or something.
修改:我会用 com.android.support:appcompat-v7:22.0.0
,直到我解决这个问题。
EDIT: I will use com.android.support:appcompat-v7:22.0.0
until I solve this problem.
推荐答案
本来simular问题,改变的背景的到的的android:背景的做的工作
Had simular issue and changed background to android:background do the job
<item name="android:background">@color/dark_blue</item>
这篇关于样式不工作与支持库22.1.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!