| GitHub Issue | n/a |
| Type | Bug |
| Priority | Medium |
| Status | Closed |
| Resolution | Done |
| Resolution Date | 2019-03-11T12:41:18.000+0000 |
| Affected Version/s | Release 3.0.0, Release 7.3.0 |
| Fix Version/s | Release 3.0.0, Release 3.1.0, 2012 Sprint 21 API, 2012 Sprint 21 |
| Components | Android |
| Labels | api, module_tabgroup, qe-testadded, tabgroup, triage |
| Reporter | Josh Roesslein |
| Assignee | Yordan Banev |
| Created | 2012-10-11T20:19:00.000+0000 |
| Updated | 2019-03-11T12:41:27.000+0000 |
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.
Fixed via PR... https://github.com/appcelerator/titanium_mobile/pull/3245 ...for TIMOB-10065.
Back ported by [PR #3251](https://github.com/appcelerator/titanium_mobile/pull/3251) into 3_0_X branch.
Confirmed that [PR #3251](https://github.com/appcelerator/titanium_mobile/pull/3251) fixes as well.
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
Issue can still be seen in SDK version
7.3.0.v20180807095741.TabGroup.backgroundColorworks on iOS but not on Android. *Test Case**Test Environment*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();Although looking at the Appc docs https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.TabGroup-property-tabsBackgroundColor
tabsBackgroundColorcan be used and can confirm works on both iOS and Android.Using the following code we can see that setting
tabsBackgroundColorto blue only shows on iOS.!Screenshot 2018-10-08 at 14.52.15.png|thumbnail!var tabGroup = Ti.UI.createTabGroup({ tabsBackgroundColor: 'blue' }); tabGroup.open();I have no issues with the following config: tiapp.xml:
app.tss:Sorry I don't know how to add a screenshot but the background is blue.'TabGroup[platform=android]': { style: Ti.UI.Android.TABS_STYLE_BOTTOM_NAVIGATION, tabsBackgroundColor: "blue" }Closing ticket. Using
8.0.0.v20190308114556and8.1.0.v20190308144226I am able to settabsBackgroundColorto blue on Android.