8

I've started my app with these two examples in mind:

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

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

It currently has

minSdkVersion = 8 minSdkTarget = 11

set up in my manifest. I've tried everything I can think of, but can't seem to get the styling I want. I've accomplished a lot of styling, but one thing eludes me still...the tabs. I can't find any way to color them.

Now before I get too far, and before you tell me I missed something obvious, is it even possible to change the colors of the tabs on Android 3.1...or even 3.0 for that matter (the normally bright blue underlines)? It seems I can do most everything else...

I've looked all over for the answer. Including these places and many, many more...

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

If nothing else, this is a decent list of links for those looking...

Thanks

Community
  • 1
  • 1
Metallicraft
  • 2,211
  • 5
  • 31
  • 52

2 Answers2

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>
Amol
  • 21
  • 1
  • 1
    I've seen, and tried, this, but all I could get it to do was put a background behind the text on the tab. What is the actionbar_tab_bg in the sample? – Metallicraft Nov 17 '11 at 03:54
0

I don't think you can change the fine blue line colors.

svpino
  • 1,864
  • 17
  • 18
  • 1
    I've seen other apps with the underline colored. The YouTube app on my 3.1 tablet is red, for example. A couple of the links above have colored tabs, but I can't get it to work. And I don't know if it's my android version, or my implementation. – Metallicraft Nov 03 '11 at 13:24