[TIMOB-14759] Android: Orientation - Window doesn't get locked to the supported orientation
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2013-08-05T19:11:52.000+0000 |
Affected Version/s | Release 3.1.2 |
Fix Version/s | 2013 Sprint 16, 2013 Sprint 16 API |
Components | Android |
Labels | qe-3.1.2, regression |
Reporter | Anshu Mittal |
Assignee | Ping Wang |
Created | 2013-08-05T10:20:44.000+0000 |
Updated | 2017-03-03T22:06:10.000+0000 |
Description
Window doesn't get locked to the supported orientation.
This is regression since the issue does not occur on 3.1.1 GA
Steps to reproduce:
1. Create an app using the code below.
2. Launch the app while device is in portrait mode.
Actual:
The app launches in portrait mode.
Expected: The app should be launched in landscape mode since the app supports only landscape modes. The same issue goes for Portrait only apps also.
var win = Ti.UI.createWindow({
backgroundColor:'white'
});
var img = Ti.UI.createImageView({image:'grouch.jpg'});
win.add(img);
win.orientationModes = [
Ti.UI.LANDSCAPE_LEFT,
Ti.UI.LANDSCAPE_RIGHT
];
win.open();
From our [doc](http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.Window-property-orientationModes), {quote}On Android, orientationModes only takes effect when specified on a heavyweight window.{quote} In the above test case, it sets orientationModes to a lightweight window. It should not have any effect. So the current 3.1.2 behavior is correct.
Resolve the ticket as Invalid.
Closing as invalid.