0

这是我的 style.xml (我必须使用 theme.Test style )。如果我使用应用程序基础主题作为我的测试主题的样式,那么我在设置 collapseActionView 背景颜色和 searchview 背景颜色时遇到问题,那么整个活动中的所有文本视图背景颜色都会发生变化

<resources xmlns:android="http://schemas.android.com/apk/res/android">

<style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
    <item name="android:actionBarStyle">@style/MyActionBar</item>

    <!-- API 14 theme customizations can go here. -->
</style>

<style name="AppTheme" parent="AppBaseTheme">
    <!-- <item name="android:background">#083044</item> -->


    <!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>

<style name="MyActionBar" parent="@android:style/Widget.Holo.Light.ActionBar">
    <item name="android:background">#083044</item>
</style>

<style name="Theme.test" parent="@style/Theme.Sherlock.Light.DarkActionBar">
    <item name="android:actionBarTabBarStyle">@style/Theme.test.tabbar.style</item>
    <item name="actionBarTabBarStyle">@style/Widget.test.ActionBar.TabBar</item>
    <item name="searchAutoCompleteTextView">@style/SearchViewStyle</item>
</style>

<style name="Theme.test.tabbar.style" parent="@style/Theme.Sherlock.Light">
    <item name="android:background">#046697</item>
    <item name="background">#046697</item>
</style>

<style name="Widget.test.ActionBar.TabBar" parent="Widget.Sherlock.Light.ActionBar.TabBar">
    <item name="android:background">#046697</item>
    <item name="background">#046697</item>
</style>

<style name="SearchViewStyle" parent="Widget.Sherlock.Light.SearchAutoCompleteTextView">
    <item name="android:textColor">@color/White</item>
    <item name="android:background">#046697</item>
    <item name="background">#046697</item>
</style>

任何帮助将不胜感激:)

谢谢

4

1 回答 1

0

我认为你需要把你的财产

<color name="white">#FFFFFF</color>

style.xml

android:background="@color/white">

AndroidManifest.xml.

于 2014-10-09T09:05:37.820 回答