[TIMOB-26889] Android: Cannot dynamically change TabGroup "title" property as of 8.0.0
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2019-04-29T21:34:26.000+0000 |
Affected Version/s | Release 8.0.0 |
Fix Version/s | Release 8.0.1 |
Components | Android |
Labels | TabGroup, android, engSchedule, regression, title |
Reporter | Andreas Pingas |
Assignee | Yordan Banev |
Created | 2019-02-25T12:34:30.000+0000 |
Updated | 2019-04-29T21:34:29.000+0000 |
Description
At android devices when a Window has its own title in a tabGroup the title never appears.
In order for the title to appear the focus has to be lost from tabGroup and return.
If that does not happen, the title appears to be the name of the app or the title of tabGroup if that is set.
var window1 = Titanium.UI.createWindow({
title:'Tab 1'
});
var window2 = Titanium.UI.createWindow({
title:'Tab 2'
});
var window3 = Titanium.UI.createWindow({
title:'Tab 3'
});
var tab1 = Ti.UI.createTab({
title:'Tab 1',
window:window1
});
var tab2 = Ti.UI.createTab({
title:'Tab 2',
window:window2
});
var tab3 = Ti.UI.createTab({
title:'Tab 3',
window:window3
});
tab1.addEventListener('selected', function() {
tabGroup.title = 'Tab 1';
});
tab2.addEventListener('selected', function() {
tabGroup.title = 'Tab 2';
});
tab3.addEventListener('selected', function() {
tabGroup.title = 'Tab 3';
});
var tabGroup = Titanium.UI.createTabGroup({
tabs:[tab1, tab2, tab3],
swipeable:true,
exitOnClose:false,
style:Titanium.UI.Android.TABS_STYLE_BOTTOM_NAVIGATION,
shiftMode:false
});
tabGroup.open();
I was able to reproduce it. It is caused by the new way the TabGroup is implemented. It now has no direct connection with the ActionBar. A workaround for this would be to manually set the title when switching tabs.
PR: https://github.com/appcelerator/titanium_mobile/pull/10778 PR (8_0_X): https://github.com/appcelerator/titanium_mobile/pull/10779
FR Passed, waiting on Jenkins builds.
*Closing ticket.* Fix verified in SDK version
8.0.1.v20190325125116}
and SDK Version8.1.0.v20190325115012
Test and other information can be found at: PR: https://github.com/appcelerator/titanium_mobile/pull/10778 PR (8_0_X): https://github.com/appcelerator/titanium_mobile/pull/10779