{ "id": "170197", "key": "TIMOB-25467", "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": [ { "id": "17609", "description": "", "name": "Release 7.0.0", "archived": false, "released": true, "releaseDate": "2017-12-07" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-11-15T00:09:06.000+0000", "created": "2017-10-31T21:38:04.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "android", "orientation", "parity" ], "versions": [], "issuelinks": [], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-11-15T06:20:58.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "*Summary:*\r\nThe \"Ti.UI.Window.orientation\" property should return the orientation that the OS is displaying its screen contents. This is how it works on iOS. Instead, on Android, it returns the orientation of the app window based on its width and height (ex: if width > height, then it's landscape).\r\n\r\nThis is an issue when displaying the app in split-screen mode. For example, when the device is held landscape, apps are displayed side-by-side in portrait form. Android currently returns portrait in this case when it should return landscape (the screen's orientation).\r\n\r\n*Steps to Reproduce:*\r\n\r\n# Run the below code on an Android 7.0 or newer device.\r\n# Hold the device in portrait orientation.\r\n# On the bottom navigation bar, hold the square button (aka: the multi-tasking button).\r\n# Select an app from the multi-tasking app list to put it into split-screen mode.\r\n# Notice that this app displays \"Landscape\" instead of \"Portrait\".\r\n# Rotate the device 90 degrees to landscape form.\r\n# Notice that this app displays \"Portrait\" instead of \"Landscape\".\r\n\r\n*Test Code:*\r\n\r\n{code:javascript}\r\nfunction getNameFromOrientationId(orientationId) {\r\n\tswitch (orientationId) {\r\n\t\tcase Ti.UI.PORTRAIT:\r\n\t\t\treturn \"Portrait Upright\";\r\n\t\tcase Ti.UI.UPSIDE_PORTRAIT:\r\n\t\t\treturn \"Portrait Upside-Down\";\r\n\t\tcase Ti.UI.LANDSCAPE_LEFT:\r\n\t\t\treturn \"Landscape Left\";\r\n\t\tcase Ti.UI.LANDSCAPE_RIGHT:\r\n\t\t\treturn \"Landscape Right\";\r\n\t\tcase Ti.UI.FACE_UP:\r\n\t\t\treturn \"Face Up\";\r\n\t\tcase Ti.UI.FACE_DOWN:\r\n\t\t\treturn \"Face Down\";\r\n\t}\r\n\treturn \"Unknown\";\r\n}\r\n\r\nvar window = Ti.UI.createWindow();\r\nvar label = Ti.UI.createLabel(\r\n{\r\n\ttext: getNameFromOrientationId(Ti.Gesture.orientation),\r\n});\r\nwindow.add(label);\r\nwindow.open();\r\n\r\nvar timerId = setInterval(function() {\r\n\tif (window) {\r\n\t\tlabel.text = getNameFromOrientationId(window.orientation);\r\n\t}\r\n}, 1000);\r\nwindow.addEventListener(\"close\", function(e) {\r\n\twindow = null;\r\n\tclearInterval(timerId);\r\n});\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Android: \"Ti.UI.Window.orientation\" should return screen orientation in split-screen mode", "creator": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "429960", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Due to the schedule for 7.0.0 versus the remaining work, moving to 7.1.0", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-01T16:58:42.000+0000", "updated": "2017-11-01T16:58:42.000+0000" }, { "id": "430106", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/9585", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-04T05:39:10.000+0000", "updated": "2017-11-04T05:39:10.000+0000" }, { "id": "430255", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed.\r\nWaiting for merge to get enabled to merge.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-07T23:40:00.000+0000", "updated": "2017-11-07T23:40:00.000+0000" }, { "id": "430630", "author": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR merged.", "updateAuthor": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-15T00:09:06.000+0000", "updated": "2017-11-15T00:09:06.000+0000" }, { "id": "430670", "author": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Changes are seen in SDK 7.0.0.v20171114202841.", "updateAuthor": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-15T06:20:58.000+0000", "updated": "2017-11-15T06:20:58.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }