Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11365] Android: TabGroup - "Toggle orientationModes" doesn't work from landscape

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionCannot Reproduce
Resolution Date2012-10-16T00:20:50.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sn/a
ComponentsAndroid
Labelsapi, module_tabgroup, qe-and100112, qe-testadded, tabgroup
ReporterTamila Smolich
AssigneeJosh Roesslein
Created2012-10-10T22:11:47.000+0000
Updated2012-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

Comments

  1. Josh Roesslein 2012-10-11

    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.
  2. Josh Roesslein 2012-10-11

    Created a new ticket (TIMOB-11393) for the background color bug.
  3. Josh Roesslein 2012-10-16

    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.
  4. Tamila Smolich 2012-10-24

    Closing the bug, since behavior that was described is correct, according to the doc.

JSON Source