Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14759] Android: Orientation - Window doesn't get locked to the supported orientation

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionInvalid
Resolution Date2013-08-05T19:11:52.000+0000
Affected Version/sRelease 3.1.2
Fix Version/s2013 Sprint 16, 2013 Sprint 16 API
ComponentsAndroid
Labelsqe-3.1.2, regression
ReporterAnshu Mittal
AssigneePing Wang
Created2013-08-05T10:20:44.000+0000
Updated2017-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();

Comments

  1. Ping Wang 2013-08-05

    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.
  2. Ping Wang 2013-08-05

    Resolve the ticket as Invalid.
  3. Lee Morris 2017-03-03

    Closing as invalid.

JSON Source