Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11393] Android: TabGroup.backgroundColor doesn't change background.

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionDone
Resolution Date2019-03-11T12:41:18.000+0000
Affected Version/sRelease 3.0.0, Release 7.3.0
Fix Version/sRelease 3.0.0, Release 3.1.0, 2012 Sprint 21 API, 2012 Sprint 21
ComponentsAndroid
Labelsapi, module_tabgroup, qe-testadded, tabgroup, triage
ReporterJosh Roesslein
AssigneeYordan Banev
Created2012-10-11T20:19:00.000+0000
Updated2019-03-11T12:41:27.000+0000

Description

Unable to set the background color of a tab group. This appears to be caused by having no "native view" setup to handle the view property changes in TiUIView.

Test Case

var tabGroup = Ti.UI.createTabGroup({
  backgroundColor: 'blue'
});

tabGroup.open();
Pass: Background color of the tab group is blue. Fail: Background color isn't blue, but black.

Attachments

FileDateSize
Screenshot 2018-10-08 at 14.52.15.png2018-10-08T14:19:37.000+0000127201

Comments

  1. Bill Dawson 2012-10-16

    Fixed via PR... https://github.com/appcelerator/titanium_mobile/pull/3245 ...for TIMOB-10065.
  2. Josh Roesslein 2012-10-16

    Back ported by [PR #3251](https://github.com/appcelerator/titanium_mobile/pull/3251) into 3_0_X branch.
  3. Bill Dawson 2012-10-16

    Confirmed that [PR #3251](https://github.com/appcelerator/titanium_mobile/pull/3251) fixes as well.
  4. Ryan Gartin 2012-12-12

    This works in 2.1.4-GA. However, when I switch to 3.0.0-beta it defaults to entire black tab color settings. 2.1.4-GA - http://imgur.com/duJKj 3.0.0-20121207 - http://imgur.com/TNlPJ
  5. Samir Mohammed 2018-08-09

    Issue can still be seen in SDK version 7.3.0.v20180807095741. TabGroup.backgroundColor works on iOS but not on Android. *Test Case*
       var win1 = Ti.UI.createWindow({
           backgroundColor: 'blue',
           title: 'Blue'
       });
       win1.add(Ti.UI.createLabel({text: 'I am a blue window.'}));
       
       var win2 = Ti.UI.createWindow({
           backgroundColor: 'red',
           title: 'Red'
       });
       win2.add(Ti.UI.createLabel({text: 'I am a red window.'}));
       
       var tab1 = Ti.UI.createTab({
           window: win1,
           title: 'Blue'
       }),
       tab2 = Ti.UI.createTab({
           window: win2,
           title: 'Red'
       }),
       tabGroup = Ti.UI.createTabGroup({
           tabs: [tab1, tab2]
               
       });
       tabGroup.backgroundColor = 'red';
       tabGroup.open();
    *Test Environment*
       APPC Studio: 5.0.0.201712081732
       APPC CLI: 7.0.4
       Nexus 6p Emulator (7.1)
       Iphone 6 Simul
       Operating System Name: Mac OS High Sierra
       Operating System Version: 10.13
       Node.js Version: 8.9.1
       Xcode 9.2
       
  6. Samir Mohammed 2018-08-09

    Although looking at the Appc docs https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.TabGroup-property-tabsBackgroundColor tabsBackgroundColor can be used and can confirm works on both iOS and Android.
  7. Samir Mohammed 2018-10-08

    Using the following code we can see that setting tabsBackgroundColor to blue only shows on iOS.
       var tabGroup = Ti.UI.createTabGroup({
         tabsBackgroundColor: 'blue'
       });
        
       tabGroup.open();
       
    !Screenshot 2018-10-08 at 14.52.15.png|thumbnail!
  8. amdolan 2019-03-08

    I have no issues with the following config: tiapp.xml:
    <sdk-version>8.0.0.v20190307063026</sdk-version>
    app.tss:
       'TabGroup[platform=android]': {
       	style: Ti.UI.Android.TABS_STYLE_BOTTOM_NAVIGATION,
       	tabsBackgroundColor: "blue"
       }
       
    Sorry I don't know how to add a screenshot but the background is blue.
  9. Samir Mohammed 2019-03-11

    Closing ticket. Using 8.0.0.v20190308114556 and 8.1.0.v20190308144226 I am able to set tabsBackgroundColor to blue on Android.

JSON Source