Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7528] Parity: Android and iOS return different values for window.orientationModes

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2012-02-16T09:09:28.000+0000
Affected Version/sRelease 1.8.1
Fix Version/sn/a
ComponentsTiAPI
Labelsapi, parity
ReporterEric Merriman
AssigneeNeeraj Gupta
Created2012-02-02T16:39:13.000+0000
Updated2017-03-24T18:17:10.000+0000

Description

Description: Running the following code on Android emulator or iOS simulator return values in a different order. iOS ="1,2,3,4" and Android: "1,3,4,2". This means that apart from TI.UI.PORTRAIT, there is no correlation between the numbers returned and the orientation mode.
Titanium.UI.setBackgroundColor('#000');
var win = Titanium.UI.createWindow({  
    title:'Test',
    backgroundColor:'#000',
	exitOnClose: true
});

win.add(Ti.UI.createView({
	backgroundColor: "blue",
	borderColor: "red",
	borderWidth: 10,
	borderRadius: 5,
	left: "10dp",
	right: "10dp",
	top: "50dp",
	height: "200dp"
}));

win.open();

win.orientationModes = [Ti.UI.PORTRAIT, Ti.UI.UPSIDE_PORTRAIT, Ti.UI.LANDSCAPE_RIGHT, Ti.UI.LANDSCAPE_LEFT];

alert("orientation modes = " + _window.orientationModes);
Steps to reproduce: 1) Create a new project with Studio 2) Replace the app.js code with the code above 3) Run the application in iOS simulator and Android emulator Result: Different values are returned for the orientation modes Expected: The same values are returned

Comments

  1. Marshall Culpepper 2012-02-16

    Constant APIs aren't expected to have the same values for parity, unless explicitly documented as such in API docs or a specification. As long as they represent the same functional behavior, they should serve the same purpose.
  2. Lee Morris 2017-03-24

    Closing ticket as invalid with reference to the above comments.

JSON Source