2013-10-17 52 views
0

這裏是我的style.xml(我必須使用theme.Test風格)。我米有在設置collapseActionView背景顏色和搜索查看背景色的麻煩,如果我在整個活動如何在backgroundview中將背景顏色設置爲#046697(淺藍色)

<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> 

任何幫助使用應用程序基本主題爲的astyle我測試的主題,那麼所有的文本視圖背景顏色變化將在此感謝:)

感謝

+0

將其用於特定的'TextView' ..不要爲每個'TextView'定義這個'style.xml' –

+0

怎樣才能向我推薦代碼或任何鏈接....... THANX – Gattsu

回答

0

我認爲你需要把你的財產

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

style.xml

android:background="@color/white">

AndroidManifest.xml

+1

無論如何,我認爲這不會起作用。 – Gattsu