[TIMOB-11365] Android: TabGroup - "Toggle orientationModes" doesn't work from landscape
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2012-10-16T00:20:50.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | n/a |
Components | Android |
Labels | api, module_tabgroup, qe-and100112, qe-testadded, tabgroup |
Reporter | Tamila Smolich |
Assignee | Josh Roesslein |
Created | 2012-10-10T22:11:47.000+0000 |
Updated | 2012-10-24T17:15:37.000+0000 |
Description
Description:
The are two issues in this code, that were noticed in 3.0.0 while testing TabGroup. First one - the background color suppose to be "red", but it is "black". And second one - "Toggle orientationModes" does not work from landscape mode, but works fine from portrait.
Steps:
1. Run the following code in landscape:
var modes = [Ti.UI.LANDSCAPE_LEFT, Ti.UI.LANDSCAPE_RIGHT];
var modesEnabled = true;
var tabGroup = Ti.UI.createTabGroup({
orientationModes: modes,
backgroundColor : 'red'
});
var tabWindow = Ti.UI.createWindow();
tabGroup.addTab(Ti.UI.createTab({window: tabWindow, title: 'Lonely tab'}));
var toggleModesButton = Ti.UI.createButton({
title: 'Toggle orientationModes'
});
toggleModesButton.addEventListener('click', function() {
tabGroup.orientationModes = modesEnabled ? [ ] : modes;
modesEnabled = !modesEnabled;
});
tabWindow.add(toggleModesButton);
tabGroup.open();
2. Click "Toggle orientationModes" button
Expected:
Orientation should be changed
Actual:
Orientation is not changing
I cannot reproduce the orientation issues, but do see the background color issue. When the application launches I can only have it in landscape (left and right) only. Clicking the button allows full sensor control (landscape or portrait). Both of which seem to be expect behavior.
Created a new ticket (TIMOB-11393) for the background color bug.
Was not able to reproduce bad behavior on master or 3_0_X branches. Device allows full rotation (sensor mode) when orientation modes is set to an empty array. Also when the modes is toggled back to landscape left & right, I can only rotate it between the two landscapes.
Closing the bug, since behavior that was described is correct, according to the doc.