[TIMOB-27075] Android: Cannot change TabGroup tab icon or title after creation
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2019-06-13T10:28:56.000+0000 |
| Affected Version/s | Release 8.0.0 |
| Fix Version/s | Release 8.0.2 |
| Components | Android |
| Labels | TabGroup, android, engSchedule, icon, regression, tab, title |
| Reporter | Ray Belisle |
| Assignee | Yordan Banev |
| Created | 2019-05-09T20:24:05.000+0000 |
| Updated | 2019-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';
I can confirm it doesn't work on 8.0.0.GA
[~raybelisle], is this a documentation issue or an issue with the SDK?
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.
Hi [~raybelisle], can you provide environment details? Also, which platform? iOS, Android, or both?
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.
[~raybelisle] My apologies, along with the platform question I meant to ask for sample code to be provided.
[~raybelisle] can you please provide a reproducible test case?
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();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.
PR: https://github.com/appcelerator/titanium_mobile/pull/10950
FR Passed, waiting on Jenkins builds. Looks like backports are also needed for 8.0.2 and 8.1.0.
8_0_X: https://github.com/appcelerator/titanium_mobile/pull/10956 8_1_X: https://github.com/appcelerator/titanium_mobile/pull/10957
PR merged
*Closing ticket* fix verified in SDK Version:
8.2.0.v20190612155743,8.1.0.v20190612160220and8.0.2.v20190612075012Test 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