2011-11-02 61 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