Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2121] iOS: Tabbed Application changes orientation to Landscape/Blinking with an explicit orientation fixed to PORTRAIT

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-04-05T21:55:37.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsn/a
Reportergabriele
AssigneeMauro Parra-Miranda
Created2012-11-09T09:20:00.000+0000
Updated2016-03-08T07:41:06.000+0000

Description

Every Tabbed Application, the same created by Project Wizard with Tabbed Application Template, with only 2 line added in file _Resources/ui/common/ApplicationTabGroup.js_ introduce a Layout probelem
function ApplicationTabGroup(Window) {
function ApplicationTabGroup(Window) {
	//create module instance
	var self = Ti.UI.createTabGroup();
	
	//create app tabs
	var win1 = new Window(L('home')),
		win2 = new Window(L('settings'));
	
	// HERE MY CHANGES
	win1.orientationModes = [Ti.UI.PORTRAIT,Ti.UI.UPSIDE_PORTRAIT];
	win2.orientationModes = [Ti.UI.PORTRAIT,Ti.UI.UPSIDE_PORTRAIT, Ti.UI.LANDSCAPE_LEFT, Ti.UI.LANDSCAPE_RIGHT];

	var tab1 = Ti.UI.createTab({
		title: L('home'),
		icon: '/images/KS_nav_ui.png',
		window: win1
	});
	win1.containingTab = tab1;
...
I've fixed the tab1 to only Ti.UI.PORTRAIT, Ti.UI.UPSIDE_PORTRAIT. I've fixed tha tab2 to Ti.UI.PORTRAIT,Ti.UI.UPSIDE_PORTRAIT, Ti.UI.LANDSCAPE_LEFT and Ti.UI.LANDSCAPE_RIGHT Launching this project with iOS 4.3, device iPhone 4 and SDK 2.1.3GA (but seems to be every 2.x affeccted) there are 2 bug managing the orientation properties of the tabs Example 1:

Launching Project in Portrait Mode

Switching between tab1 to tab2

Changing orientation to Lanscape, the tab2 layout will be in LANDSCAPE

Returning to tab1 the layout still persist in LANSCAPE

Example 2:

Launching Project in Portrait Mode

Switching between tab1 to tab2

Returning to tab1

Changing orientation to Lanscape, the tab1 layout will BLINK and seems to rotate between LANDSCAPE to PORTRAIT

These situation seems to be something wrong in the mapping of TAB orientation properties.

Attachments

FileDateSize
test_orientamento.zip2012-11-09T09:20:00.000+00003702643

Comments

  1. Daniel Sefton 2013-04-05

    On iOS 6, both 2.1.3 GA and 3.0.2 GA: > The behavior is as expected - if you switch to tab 2, then you can rotate the application to portrait, landscape left and landscape right. When you switch back to tab 1, it swaps to portrait since that is the only orientation mode supported by the window. It doesn't stay in landscape as described. On iOS 4.3.5, both 2.1.3 GA and 3.0.2 GA: > The application doesn't rotate at all and remains in portrait with both tabs. I'm not sure if this is an issue or not - I'm guessing it's an OS problem, not ours. But either way it doesn't relate to the behavior you are describing. Note that only portrait is listed in the tiapp.xml.

JSON Source