[TIMOB-7528] Parity: Android and iOS return different values for window.orientationModes
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2012-02-16T09:09:28.000+0000 |
Affected Version/s | Release 1.8.1 |
Fix Version/s | n/a |
Components | TiAPI |
Labels | api, parity |
Reporter | Eric Merriman |
Assignee | Neeraj Gupta |
Created | 2012-02-02T16:39:13.000+0000 |
Updated | 2017-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
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.
Closing ticket as invalid with reference to the above comments.