{ "id": "76429", "key": "TIMOB-4511", "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": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2012-03-27T13:50:17.000+0000", "created": "2011-06-15T11:46:03.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [ { "id": "11244", "name": "Release 1.7.0", "archived": true, "released": true, "releaseDate": "2011-06-13" } ], "issuelinks": [], "assignee": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-03-27T13:50:17.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": "h1. Problem\r\nOn Android, Ti.Gesture.orientation is returning different values than e.orientation, and neither are differentiating landscape left and right.\r\n\r\nh2. Sample Code\r\nThe following code reports the different orientation values. Run it on iOS, and you will see the Ti.Gesture.orientation is in sync with the evt.orientation. But run it on Android, and you will see they differ.\r\n{code:title=app.js}\r\nvar win = Ti.UI.createWindow({ backgroundColor: '#fff' });\r\nvar lblOrientation = Ti.UI.createLabel({\r\n color: '#999',\r\n text: 'Ti.Gesture.orientation',\r\n font: { fontSize: 20, fontFamily: 'Helvetica Neue' },\r\n textAlign: 'center',\r\n width: 'auto', height: 'auto',\r\n top: 20\r\n});\r\nwin.add(lblOrientation);\r\nvar lblEvtOrientation = Ti.UI.createLabel({\r\n color: '#999',\r\n text: 'e.orientation',\r\n font: { fontSize: 20, fontFamily: 'Helvetica Neue' },\r\n textAlign: 'center',\r\n width: 'auto', height: 'auto',\r\n top: 50\r\n});\r\nwin.add(lblEvtOrientation);\r\nvar lblIsPortrait = Ti.UI.createLabel({\r\n color: '#999',\r\n text: 'isPortrait',\r\n font: { fontSize: 20, fontFamily: 'Helvetica Neue' },\r\n textAlign: 'center',\r\n width: 'auto',\r\n height: 'auto',\r\n top: 80\r\n});\r\nwin.add(lblIsPortrait);\r\nvar lblIsLandscape = Ti.UI.createLabel({\r\n color: '#999',\r\n text: 'isLandscape',\r\n font: { fontSize: 20, fontFamily: 'Helvetica Neue' },\r\n textAlign: 'center',\r\n width: 'auto', height: 'auto',\r\n top: 110\r\n});\r\nwin.add(lblIsLandscape);\r\n\r\nTi.Gesture.addEventListener('orientationchange', function(evt) {\r\n lblOrientation.text = Ti.Gesture.orientation;\r\n lblEvtOrientation.text = evt.orientation;\r\n lblIsPortrait.text = evt.source.isPortrait();\r\n lblIsLandscape.text = evt.source.isLandscape();\r\n});\r\n\r\nwin.open();\r\n{code}\r\n\r\nh2. Screenshots\r\nSee attached screens.\r\n\r\nh2. May Duplicate\r\n[TIMOB-1294]", "attachment": [ { "id": "21169", "filename": "left.png", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2011-06-15T11:46:03.000+0000", "size": 17468, "mimeType": "image/png" }, { "id": "21170", "filename": "right.png", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2011-06-15T11:46:03.000+0000", "size": 17468, "mimeType": "image/png" }, { "id": "21171", "filename": "Screenshot_18.png", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2011-06-15T11:46:03.000+0000", "size": 116526, "mimeType": "image/png" }, { "id": "21172", "filename": "Screenshot_19.png", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2011-06-15T11:46:03.000+0000", "size": 116654, "mimeType": "image/png" } ], "flagged": false, "summary": "Orientation properties report differing values on Android, and differ from iOS", "creator": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "environment": "Titanium Mobile 1.7.0, iOS simulator, Android running on a Droid 1 with Android 2.2.2", "comment": { "comments": [ { "id": "156811", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "body": "I think this only half duplicates [TIMOB-1294]. You bring up two bugs:\r\n\r\n1. e.orientation should equal Ti.Gesture.orientation. This duplicates [TIMOB-1294].\r\n2. The orientations are incorrect for left and right landscape; they should be consistent between iOS and Android.\r\n\r\nSo this ticket could be repurposed for the 2nd issue you brought up, and the 1st can be removed. You could provide more details and sample code on [TIMOB-1294] to help it on its way, too.", "updateAuthor": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2011-06-15T11:55:11.000+0000", "updated": "2011-06-15T11:55:11.000+0000" }, { "id": "156812", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "Just to be clear:\r\n\r\nOn Android \r\n* e.orientation reports the same value whether phone is landscape left or right\r\n* Ti.Gesture.orientation is also the same whether left or right\r\n* But e.orientation != Ti.Gesture.orientation regardless of phone's orientation\r\n\r\nOn iOS\r\n* e.orientation reports the different values when phone is landscape left or right\r\n* Ti.Gesture.orientation is also reports different when left or right\r\n* And e.orientation == Ti.Gesture.orientation \r\n\r\niOS appears to be working correctly and as I'd expect. I've provided info on it just as a contrast to what's happening on Android.\r\n", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2011-06-15T11:56:17.000+0000", "updated": "2011-06-15T12:00:34.000+0000" }, { "id": "157230", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Tim\r\n\r\nBeing an employee, you should have write access to the main projects. Can you confirm this, please?\r\n\r\nThus, you should be able to move this ticket yourself to the correct project.\r\n\r\nThanks", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-06-20T16:09:05.000+0000", "updated": "2011-06-20T16:09:05.000+0000" }, { "id": "157910", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "Paul, I can create issues under two projects: Aptana Studio and Titanium Community. ", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2011-06-28T06:47:46.000+0000", "updated": "2011-06-28T06:47:46.000+0000" }, { "id": "157918", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Tim, OK, my apologies - it isn't actually available to *all* employees but, rather, some departments.", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-06-28T07:32:00.000+0000", "updated": "2011-06-28T07:32:00.000+0000" }, { "id": "176788", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I was not able to reproduce this bug in master. I will be filing a separate bug for apidocs regarding what ti.gesture.orientation returns.", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-20T17:05:21.000+0000", "updated": "2011-12-20T17:05:21.000+0000" }, { "id": "176813", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "Yes, this seems to have been fixed in the 1.8 series as I can't reproduce the problem any more either.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2011-12-21T06:15:20.000+0000", "updated": "2011-12-21T06:15:20.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }