Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-28220] Android: tintColor/activeTintColor or titleColor/activeTitleColor not respected for tabgroup with style TABS_STYLE_BOTTOM_NAVIGATION

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2020-11-19T16:23:34.000+0000
Affected Version/sRelease 9.1.0
Fix Version/sRelease 9.3.0
ComponentsAndroid
LabelsTabGroup, android, regression, tab
ReporterEwan Harris
AssigneeGary Mathews
Created2020-11-03T17:49:35.000+0000
Updated2020-11-19T16:23:34.000+0000

Description

Description

When setting the tintColor/activeTintColor or titleColor/activeTitleColor properties they are no longer respected as of 9.1.0.GA when the style is set to TABS_STYLE_BOTTOM_NAVIGATION and the icons are no longer coloured. Note: The titleColor/activeTitleColor properties do color the title in 9.1.0.GA, whereas in 9.0.3.GA they color both the icon and the title. This might be expected behaviour
const tabGroup = Ti.UI.createTabGroup({
	style: Ti.UI.Android.TABS_STYLE_BOTTOM_NAVIGATION,
	tintColor: 'red',
	activeTintColor: 'blue'
}); 
const tabWin_home = Ti.UI.createWindow({
   	title: 'Home',
   	backgroundColor: 'white'
});
const tab_home = Ti.UI.createTab({
   	icon: 'assets/images/tab1.png',
   	title: 'Home',
   	window: tabWin_home,
	tintColor: 'red',
	activeTintColor: 'blue'
}); 
const tabWin_chat = Ti.UI.createWindow({
	title: 'Chat',
	backgroundColor: 'white'
});
const tab_chat = Ti.UI.createTab({
	icon: 'assets/images/tab2.png',
	title: 'Chat',
	window: tabWin_chat,
	tintColor: 'red',
	activeTintColor: 'blue',
});
tabGroup.addTab(tab_home);
tabGroup.addTab(tab_chat);
tabGroup.open();

Steps to reproduce

1. Add the code above to an existing classic project (it references images from the default template) 2. Build to Android using 9.1.0.GA or higher

Actual

No color set on the icons

Expected

Icons should be blue when tab is active and red when tab is inactive

Comments

  1. Gary Mathews 2020-11-03

    master: https://github.com/appcelerator/titanium_mobile/pull/12242
  2. Christopher Williams 2020-11-06

    merged to master for 9.3.0 target.
  3. Samir Mohammed 2020-11-19

    *Closing ticket*. Fix verified in SDK version 9.3.0.v20201119063936. Test and other information can be found at: https://github.com/appcelerator/titanium_mobile/pull/12242

JSON Source