[TIMOB-3612] Android: orientationModes does not work
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-05-16T16:20:41.000+0000 |
Affected Version/s | Release 1.6.0 |
Fix Version/s | Release 2.0.1 |
Components | Android |
Labels | module_orientation, qe-review, qe-testadded |
Reporter | Jon Alter |
Assignee | Neeraj Gupta |
Created | 2011-04-18T13:39:07.000+0000 |
Updated | 2012-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();
This error is still reproducible on Ti SDK 1.7.0
Issue fixed in Release 2.0
Closing and verfied on: Tested with Titanium SDK: 2.2.0.v20120808154112 Tested with Titanium Studio: 2.1.1.201207271312