[TIMOB-27826] Android: Unable to select tabs after setting "labels" via TabbedBar "click" (Parity)
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | None |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 9.1.0 |
Fix Version/s | n/a |
Components | Android |
Labels | n/a |
Reporter | Samir Mohammed |
Assignee | Unknown |
Created | 2020-03-27T16:35:47.000+0000 |
Updated | 2020-03-27T16:40:22.000+0000 |
Description
*Note* this PR needs to be merged first https://github.com/appcelerator/titanium_mobile/pull/11495.
This is a parity issue between iOS and Android. After Setting "labels" via TabbedBar "click" on Android I am unable to move through the new tabs while on iOS I am able to.
*Test case*
var window = Ti.UI.createWindow();
var tabbedBar = Ti.UI.createTabbedBar();
tabbedBar.labels = ["One", "Two", "Three"];
tabbedBar.addEventListener("click", function() {
console.log(new Date() + " tbrSortTLby Click event triggerred");
tabbedBar.labels = ['Three', 'Four', 'Five'];
})
window.add(tabbedBar);
window.open();
*Test Steps*
Create a titanium application (if above PR is not merged create the build using the PR)
Add the test case above into the titanium application
Run the test case
Click on a tab (tab 2 for instance)
Try click on tab 4
With the above test steps on Android you will not be able to click on Tab 4 but on iOS you will be able to. *Working Android example code:*
var window = Ti.UI.createWindow();
var tabbedBar = Ti.UI.createTabbedBar();
var secondVersion = false;
tabbedBar.labels = ["One", "Two", "Three"];
tabbedBar.addEventListener("click", function() {
console.log(new Date() + " tbrSortTLby Click event triggerred");
if (!secondVersion) {
tabbedBar.labels = ['Three', 'Four', 'Five'];
}
secondVersion = true;
})
window.add(tabbedBar);
window.open();
No comments