2011-11-02 67 views
8

我開始我的應用程序這兩個例子記住一個明確的答案:極品造型的Android ActionBar的標籤

http://code.google.com/p/iosched/

http://developer.android.com/resources/samples/HoneycombGallery/index.html

目前有

minSdkVersion = 8 minSdkTarget = 11 

集在我的清單中。我嘗試了所有我能想到的,但似乎無法得到我想要的造型。我已經完成了很多造型,但有一件事仍然沒有......標籤。我找不到任何顏色的方法。

現在,在我過得太遠之前,在你告訴我之前我錯過了一些明顯的東西,甚至有可能改變Android 3.1上的標籤的顏色......甚至是3.0這個問題(通常是明亮的藍色下劃線)?看來我可以做最其他的一切......

我已經找遍了所有的答案。包括這些地方和許多,許多......

http://developer.android.com/guide/topics/ui/actionbar.html

http://android-developers.blogspot.com/2010/05/twitter-for-android-closer-look-at.html

http://developer.android.com/resources/samples/ActionBarCompat/index.html

http://android-developers.blogspot.com/2011/04/customizing-action-bar.html

Android 3.0 ActionBar, changing colors

Android action bar like twitter sample

Android ActionBar tab style for Honeycomb

http://groups.google.com/group/android-developers/browse_thread/thread/983509d7261c54f4

如果不出意外,這是爲那些尋找鏈接體面列表...

感謝

回答

0

我不認爲你可以改變精美藍線顏色。

+1

我看過其他帶下劃線的應用程序着色。例如,我的3.1平板電腦上的YouTube應用程序是紅色的。上面的幾個鏈接都有彩色標籤,但是我無法使它工作。而且我不知道它是我的Android版本還是我的實現。 – Metallicraft

+0

你有沒有解決這個問題,以及如何?我也需要它在不同的顏色... – Balkyto

2
<style name="MyTheme.Light" parent="@android:style/Theme.Holo.Light"> 
    <item name="android:windowActionBarOverlay">true</item> 
    <item name="android:actionBarTabStyle">@style/customActionBarTabStyle</item> 
    <item name="android:actionBarTabTextStyle">@style/customActionBarTabTextStyle</item> 
</style> 
    <style name="customActionBarTabTextStyle"> 
      <item name="android:textColor">@android:color/white</item> 
    </style> 
    <style name="customActionBarTabStyle"> 
      <item name="android:background">@drawable/actionbar_tab_bg</item> 
      <item name="android:paddingLeft">24dp</item> 
      <item name="android:paddingRight">24dp</item> 
    </style> 
+1

我見過,並試過,這,但我所能做的就是把背景放在選項卡上的文字背後。示例中的actionbar_tab_bg是什麼? – Metallicraft