Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24233] Android: tabsBackgroundColor is not working.

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2017-01-24T20:38:01.000+0000
Affected Version/sRelease 6.0.0
Fix Version/sRelease 6.1.0
ComponentsAndroid
Labelsn/a
ReporterSharif AbuDarda
AssigneeFrankie Merzadyan
Created2016-12-16T13:53:34.000+0000
Updated2017-01-25T18:58:49.000+0000

Description

Hello, tabsBackgroundColor for tabGroup is not work in Android, iOS is working as expected. Docs shows it's supported. http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.TabGroup-property-tabsBackgroundColor
var tabGroup = Ti.UI.createTabGroup({
    tabsBackgroundColor: 'green'
});
Tested with latest SDK 6.0.0.GA. Thanks.

Attachments

FileDateSize
Screenshot_20161220-223850.png2016-12-20T16:44:51.000+000025249

Comments

  1. Hans Knöchel 2016-12-17

    [~fmerzadyan] Can you check? Thx!
  2. Frankie Merzadyan 2017-01-10

    master: https://github.com/appcelerator/titanium_mobile/pull/8740
  3. Andy Waldman 2017-01-25

    Wednesday 25th January: Environment: Appcelerator Command-Line Interface, version 6.1.0 Android 7.1 (Google Pixel) Operating System Name: MacOS Sierra Operating System Version: 10.12.1 Node.js Version: 4.5.0 NPM: 4.2.8 Appc NPM: 4.2.8 Titanium SDK Version: 6.1.0.v20170125103400 Xcode: 8.2.1 Studio Build: 4.8.1.201612050850 Step 1) Add a background color attribute to the window in app js:
       /**
        * Create a new Ti.UI.TabGroup.
        */
       var tabGroup = Ti.UI.createTabGroup();
       
       /**
        * Add the two created tabs to the tabGroup object.
        */
       tabGroup.addTab(createTab("Tab 1", "I am Window 1", "assets/images/tab1.png"));
       tabGroup.addTab(createTab("Tab 2", "I am Window 2", "assets/images/tab2.png"));
       /**
        * Open the tabGroup
        */
       tabGroup.open();
       
       /**
        * Creates a new Tab and configures it.
        *
        * @param  {String} title The title used in the Ti.UI.Tab and it's included Ti.UI.Window
        * @param  {String} message The title displayed in the Ti.UI.Label
        * @return {String} icon The icon used in the Ti.UI.Tab
        */
       function createTab(title, message, icon) {
           var win = Ti.UI.createWindow({
               title: title,
               backgroundColor: 'blue'
           });
       
           var label = Ti.UI.createLabel({
               text: message,
               color: "#333",
               font: {
                   fontSize: 20
               }
           });
       
           win.add(label);
       
           var tab = Ti.UI.createTab({
               title: title,
               icon: icon,
               window: win
           });
           
           tab.backgroundColor = "blue";
       	
           return tab;
       }
       
       
    Step 2) Build and run application on Pixel with latest 6.1.0 Step 3) Check to make sure the app window has matching background color to the one set and nothing breaks Step 4) Fix verified

JSON Source