Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3612] Android: orientationModes does not work

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-05-16T16:20:41.000+0000
Affected Version/sRelease 1.6.0
Fix Version/sRelease 2.0.1
ComponentsAndroid
Labelsmodule_orientation, qe-review, qe-testadded
ReporterJon Alter
AssigneeNeeraj Gupta
Created2011-04-18T13:39:07.000+0000
Updated2012-08-14T04:39:59.000+0000

Description

Setting the orientationModes property on a window does not have any effect. If the window is heavyweight then the window will not rotate. If the window is lightweight, the window will rotate in any direction. Both behaviors happen irrelevant of what is set for orientationModes. Step 1: run the code below Step 2: if fullscreen is not set, notice that the window rotates to any orientation no matter what is set for win.orientationModes Step 3: if fullscreen is true, notice that the window will only be portrait no matter what is set for win.orientationModes
var win = Ti.UI.createWindow({
	// fullscreen: true,
	backgroundColor: 'blue'
});
win.orientationModes = [Titanium.UI.PORTRAIT,Ti.UI.LANDSCAPE_RIGHT, Ti.UI.LANDSCAPE_LEFT];
// win.orientationModes = [Titanium.UI.PORTRAIT];
var txt = Titanium.UI.createTextField({
	hintText:'This is text',
	width:200
});

win.add(txt);

win.open();

Tested On

Android 2.2 Emulator, TiSDK 1.6.1 Galaxy Tab 2.2.1, TiSDK 1.6.1

Associated Helpdesk Ticket

http://support-admin.appcelerator.com/display/ZYS-62136-677

Comments

  1. Anirudh Nagesh 2011-06-20

    This error is still reproducible on Ti SDK 1.7.0
  2. Varun Joshi 2012-05-16

    Issue fixed in Release 2.0
  3. Neha Chhabra 2012-08-14

    Closing and verfied on: Tested with Titanium SDK: 2.2.0.v20120808154112 Tested with Titanium Studio: 2.1.1.201207271312

JSON Source