Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Changing TabGroup background color

Is it possible to change the background color of a TagGroup? I didn't find any answer here, the only thing I can do is setting the barColor property, but I'd like to change the tabs background. Is there a solution?
Thank you

— asked October 14th 2010 by Andrea Franz
  • tabgroup
0 Comments

8 Answers

  • This works in SDK 2.1.4-GA, anyone know why it is broken again in the 3.0.0-beta SDK?

    var self = Ti.UI.createTabGroup({
        color: '#FF0000',
        backgroundColor: '#D50000'
    });
    
    — answered December 12th 2012 by Ryan Gartin
    permalink
    0 Comments
  • tabsBackgroundColor :'black',
    

    Gave solution to me.

    — answered December 18th 2013 by pradeep kondapaka
    permalink
    0 Comments
  • did you find a solution ?

    — answered December 3rd 2010 by Moshe Marciano
    permalink
    0 Comments
  • Any news on this? I'm having the same problem here. There are some backgroundColor options in the docs, but they don't seem to have any effect…

    — answered July 18th 2011 by Tiago Scolari
    permalink
    0 Comments
  • I have the same problem, running 1.8 from 18 oct. I can change the backgroundColor on the TabGroup, but it looks more like a border color. Tried setting the backgroundSelected and backgroundFocusedcolor as well on TabGroup and the Tab it self. Nothing happens, I'm getting a yellow gradient when I click on a tab group in Android. (Developing for Android 2.2)

    — answered October 31st 2011 by Ted Sundin
    permalink
    0 Comments
  • Any solutions to this?

    — answered April 25th 2012 by Zane Wright
    permalink
    0 Comments
  • I'm also having issues with this. Anyone find a solution that doesn't involve a major hack?

    — answered August 30th 2012 by Adam Magaña
    permalink
    0 Comments
  • it's in the [doc] (http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.TabGroup-object.html)

    Titanium.UI.TabGroup.backgroundColor
    
    — answered December 3rd 2010 by soemarko ridwan
    permalink
    3 Comments
    • that does not work. Its in the docs, but i tryed all the *color attributes there, none of them seems to work.

      — commented July 18th 2011 by Tiago Scolari
    • Second that. None of these options work! I've tried:

      backgroundImage: '/images/sale-tab.png',
      backgroundDisabledImage: '/images/sale-tab.png',
      backgroundFocusedImage: '/images/sale-tab.png',
      backgroundImage: '/images/sale-tab.png',
      backgroundGradient: null,
      backgroundColor: Styles.colors.royal_blue,
      backgroundDisabledColor: Styles.colors.royal_blue,
      backgroundFocusedColor: Styles.colors.royal_blue,
      backgroundSelectedColor: Styles.colors.royal_blue
      

      And they all have Zero effect. Nada. The only thing that has any effect is changing the text with the title attribute but the tab ALWAYS renders with the default grey gradient. This is on SDK 1.8.1 Android.

      — commented February 27th 2012 by Eric Rushing
    • I found this:

      -(void)setTabsBackgroundColor_:(id)value
      {
          if ([TiUtils isIOS5OrGreater]) {
              TiColor* color = [TiUtils colorValue:value];
              if (color != nil) {
                  controller.tabBar.tintColor = color.color;
              }
      
          } else {
              NSLog(@"[WARN] tabsBackgroundColor is only supported in iOS 5 or above.");
          }
      }
      

      — commented October 26th 2012 by Rainer Schleevoigt
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.