Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27075] Android: Cannot change TabGroup tab icon or title after creation

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2019-06-13T10:28:56.000+0000
Affected Version/sRelease 8.0.0
Fix Version/sRelease 8.0.2
ComponentsAndroid
LabelsTabGroup, android, engSchedule, icon, regression, tab, title
ReporterRay Belisle
AssigneeYordan Banev
Created2019-05-09T20:24:05.000+0000
Updated2019-06-13T10:28:56.000+0000

Description

Setting a new icon on a tab does not update the icon. Works in 7.5.x. Icon renders properly on creation or add of a tab, but you cannot change/update it. $.tab.icon = 'image.png';

Comments

  1. Brian García 2019-05-09

    I can confirm it doesn't work on 8.0.0.GA
  2. Brian Immel 2019-05-10

    [~raybelisle], is this a documentation issue or an issue with the SDK?
  3. Ray Belisle 2019-05-10

    It is with the SDK, but when I tried to create it with the other option, it didn't have SDK 8.0 listed as a valid SDK, so I had to put it under the DOCS section.
  4. Alan Hutton 2019-05-10

    Hi [~raybelisle], can you provide environment details? Also, which platform? iOS, Android, or both?
  5. Ray Belisle 2019-05-10

    Using: Operating System Name = Mac OS X Version = 10.13.6 Architecture = 64bit # CPUs = 4 Memory = 8.0GB Node.js Node.js Version = 8.9.1 npm Version = 5.5.1 Titanium CLI CLI Version = 5.1.1 node-appc Version = 0.2.44 Titanium SDKs 8.0.0.GA Version = 8.0.0 Install Location = /Users/raybelisle/Library/Application Support/Titanium/mobilesdk/osx/8.0.0.GA Platforms = iphone, android git Hash = 3726240fa2 git Timestamp = unknown node-appc Version = 0.2.47 The issue is happening on Android. iOS seems to be fine.
  6. Alan Hutton 2019-05-13

    [~raybelisle] My apologies, along with the platform question I meant to ask for sample code to be provided.
  7. Abir Mukherjee 2019-05-21

    [~raybelisle] can you please provide a reproducible test case?
  8. Brian García 2019-05-30

    I can not upload images but the code is the following
       	var win1 = Ti.UI.createWindow({
       		backgroundColor: 'blue',
       		title: 'Blue'
       	});
       	var button = Ti.UI.createButton({ title: 'Change tab' });
       	button.addEventListener('click', function () {
       		tab1.icon = '/images/ChatBadge.png';
       		tab1.title = 'changed';
       	});
       	win1.add(button);
       
       	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.open();
       
  9. Alan Hutton 2019-05-30

    Reproduced with Titanium SDKs 8.0.0.GA, 8.0.1.GA, and confirmed 7.5.0.GA does not have the issue. Under SDK 8.1.0.v20190530082817 tab titles no longer visible as well.
  10. Yordan Banev 2019-06-07

    PR: https://github.com/appcelerator/titanium_mobile/pull/10950
  11. Samir Mohammed 2019-06-11

    FR Passed, waiting on Jenkins builds. Looks like backports are also needed for 8.0.2 and 8.1.0.
  12. Yordan Banev 2019-06-11

    8_0_X: https://github.com/appcelerator/titanium_mobile/pull/10956 8_1_X: https://github.com/appcelerator/titanium_mobile/pull/10957
  13. Keerthi Mahalingam 2019-06-12

    PR merged
  14. Samir Mohammed 2019-06-13

    *Closing ticket* fix verified in SDK Version: 8.2.0.v20190612155743, 8.1.0.v20190612160220 and 8.0.2.v20190612075012 Test and other information can be found at: Master: https://github.com/appcelerator/titanium_mobile/pull/10950 8_0_X: https://github.com/appcelerator/titanium_mobile/pull/10956 8_1_X: https://github.com/appcelerator/titanium_mobile/pull/10957

JSON Source