{ "id": "85877", "key": "TIMOB-7528", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2012-02-16T09:09:28.000+0000", "created": "2012-02-02T16:39:13.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "api", "parity" ], "versions": [ { "id": "12677", "description": "Release 1.8 Service Pack 1", "name": "Release 1.8.1", "archived": true, "released": true, "releaseDate": "2012-01-31" } ], "issuelinks": [], "assignee": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-24T18:17:10.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10224", "name": "TiAPI", "description": "This component is used for cross-platform API work. Specifications are most likely to use this component." } ], "description": "Description:\r\nRunning 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.\r\n\r\n{code}\r\nTitanium.UI.setBackgroundColor('#000');\r\nvar win = Titanium.UI.createWindow({ \r\n title:'Test',\r\n backgroundColor:'#000',\r\n\texitOnClose: true\r\n});\r\n\r\nwin.add(Ti.UI.createView({\r\n\tbackgroundColor: \"blue\",\r\n\tborderColor: \"red\",\r\n\tborderWidth: 10,\r\n\tborderRadius: 5,\r\n\tleft: \"10dp\",\r\n\tright: \"10dp\",\r\n\ttop: \"50dp\",\r\n\theight: \"200dp\"\r\n}));\r\n\r\nwin.open();\r\n\r\nwin.orientationModes = [Ti.UI.PORTRAIT, Ti.UI.UPSIDE_PORTRAIT, Ti.UI.LANDSCAPE_RIGHT, Ti.UI.LANDSCAPE_LEFT];\r\n\r\nalert(\"orientation modes = \" + _window.orientationModes);\r\n{code}\r\n\r\nSteps to reproduce:\r\n1) Create a new project with Studio\r\n2) Replace the app.js code with the code above\r\n3) Run the application in iOS simulator and Android emulator\r\n\r\nResult:\r\nDifferent values are returned for the orientation modes\r\n\r\nExpected:\r\nThe same values are returned\r\n", "attachment": [], "flagged": false, "summary": "Parity: Android and iOS return different values for window.orientationModes", "creator": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Mac OS 10.7.2\r\nSDK: 1.8.1 GA\r\nTitanium Studio, build: 1.0.8.201201262211", "comment": { "comments": [ { "id": "183399", "author": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "body": "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.", "updateAuthor": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-16T09:09:28.000+0000", "updated": "2012-02-16T09:09:28.000+0000" }, { "id": "415655", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid with reference to the above comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-24T18:17:10.000+0000", "updated": "2017-03-24T18:17:10.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }