{ "id": "89939", "key": "TIMOB-8705", "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-04-16T16:32:37.000+0000", "created": "2012-04-12T15:02:36.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "core", "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": [ { "id": "16630", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "90230", "key": "TIMOB-8742", "fields": { "summary": "Android: Provide a means to \"unset\" positioning properties for a view", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-09T23:25:28.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": "*Code*\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\torientationModes: [ Ti.UI.PORTRAIT,\r\n\t\t\t\t\t\tTi.UI.UPSIDE_PORTRAIT,\r\n\t\t\t\t\t\tTi.UI.LANDSCAPE_LEFT,\r\n\t\t\t\t\t\tTi.UI.LANDSCAPE_RIGHT ],\r\n\tbackgroundColor: 'white'\r\n});\r\n\r\nvar view = Ti.UI.createView({\r\n\twidth: 100,\r\n\theight: 100,\r\n\tbackgroundColor: 'red'\r\n});\r\n\r\nTi.Gesture.addEventListener('orientationchange', function(e)\r\n{\r\n\tif (e.orientation == Titanium.UI.PORTRAIT || \r\n\t\te.orientation == Titanium.UI.UPSIDE_PORTRAIT)\r\n\t{\r\n\t\tTi.API.info('In portrait mode.');\r\n\t\tview.left = 'auto';\r\n\t}\r\n\t\r\n\telse if (e.orientation == Titanium.UI.LANDSCAPE_LEFT || \r\n\t\t\t e.orientation == Titanium.UI.LANDSCAPE_RIGHT)\r\n\t{\r\n\t\tTi.API.info('In landscape mode.');\r\n\t\tview.left = 10;\r\n\t}\r\n});\r\n\r\nwin.add(view);\r\nwin.open();\r\n\r\n{code}\r\n\r\n*Expected behavior*\r\nWhen you rotate the device from portrait to landscape -> the red square should be 10px from the left. \r\nNow if you rotate back from landscape to portrait -> the square should be in the center again.\r\n\r\n*Actual behavior*\r\nOn the iOS simulator, this is perfectly fine. \r\nOn an Android device, instead of moving back to the center, left = 0.\r\n\r\n*Notes*\r\n-Only tested on the iOS simulator & HTC Sensation 4G.\r\n-Will update customer priority, once I get a reply. *EDIT* Updated priority.\r\n-HD ticket: http://support-admin.appcelerator.com/display/APP-647528", "attachment": [], "flagged": false, "summary": "Android: Orientation change doesn't properly reflect the behavior for 'auto' properties", "creator": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "environment": "Titanium SDK version: 1.8.2\r\nPlatform & version: Android 2.3.x\r\nDevice Details: HTC Sensation 4G\r\nHost Operating System: OSX 10.7.2\r\nTitanium Studio version: 1.0.9.201202141208", "comment": { "comments": [ { "id": "190976", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "'auto' is not a valid value for a positioning pin (left, right, top, bottom, center). 'auto' is supposed to be used with dimension parameters only. Invalid values on IOS are treated as undefined and as 0 on Android.", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-04-13T16:53:37.000+0000", "updated": "2012-04-13T16:53:37.000+0000" }, { "id": "191150", "author": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "body": "Thanks Vishal, makes sense. This ticket can be closed/marked as invalid.", "updateAuthor": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "created": "2012-04-16T12:18:32.000+0000", "updated": "2012-04-16T12:18:32.000+0000" }, { "id": "191172", "author": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "updateAuthor": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "created": "2012-04-16T13:05:13.000+0000", "updated": "2012-04-16T13:05:13.000+0000" }, { "id": "411008", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-09T23:25:28.000+0000", "updated": "2017-03-09T23:25:28.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }