{ "id": "93470", "key": "TIMOB-9634", "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": "2020-01-09T22:12:07.000+0000", "created": "2012-06-19T10:52:52.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "api", "qe-and060112", "usability" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [], "assignee": null, "updated": "2020-01-09T22:12:07.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": "Description:\r\nThe red square changes it's size after the \"Start\" button pressed and the device is rotated.\r\n\r\nNot a regression, occurs in 2.0.2 as well. \r\n\r\nSteps to reproduce:\r\n1. Run an attached code\r\n\r\n{code}\r\n\r\nvar win = Ti.UI.currentWindow;\r\nwin.backgroundColor = 'white';\r\n\r\nvar buttonStart = Ti.UI.createButton({\r\n\ttitle: 'Start',\r\n\ttop: 20,\r\n\theight: Ti.UI.SIZE,\r\n\twidth: Ti.UI.SIZE\r\n\r\n});\r\nvar buttonFinish = Ti.UI.createButton({\r\n\ttitle: 'Finish',\r\n\ttop: 140,\r\n\theight: Ti.UI.SIZE,\r\n\twidth: Ti.UI.SIZE\t\r\n});\r\nvar buttonUpdate = Ti.UI.createButton({\r\n\ttitle: 'Update',\r\n\ttop: 260,\r\n\theight: Ti.UI.SIZE,\r\n\twidth: Ti.UI.SIZE\r\n});\r\n\r\nbuttonStart.addEventListener('click', function()\r\n{\t\r\n\tview.startLayout();\r\n\tview.width = 75;\r\n\tview.height = 75;\r\n\t// view.backgroundColor = 'blue'; will not be affected by startLayout/finishLayout; not a layout parameter\r\n});\r\n\r\nbuttonFinish.addEventListener('click', function()\r\n{\t\r\n\tview.finishLayout();\r\n});\r\n\r\n\r\nbuttonUpdate.addEventListener('click', function()\r\n{\t\r\n\tview.updateLayout({\r\n\t\t// backgroundColor: 'yellow', will not be affected by updateLayout; not a layout parameter\r\n\t\theight: 100,\r\n\t\twidth:100\r\n\t});\r\n});\r\n\r\n\r\nvar view = Ti.UI.createView({\r\n\tbackgroundColor: 'red',\r\n\theight: 50,\r\n\twidth: 50,\r\n\ttop: 330\r\n})\r\n\r\n\r\nwin.add(buttonStart);\r\nwin.add(buttonFinish);\r\nwin.add(buttonUpdate);\r\nwin.add(view);\r\n\r\n{code}\r\n\r\n2. Press Start button\r\n4. Rotate the device\r\n\r\nActual result:\r\nThe red square has a different size.\r\n\r\nExpected results:\r\nRed square should stay the same size.", "attachment": [ { "id": "28494", "filename": "LayoutChange1.png", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-19T10:52:52.000+0000", "size": 20230, "mimeType": "image/png" }, { "id": "28493", "filename": "layutChange.png", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-19T10:52:52.000+0000", "size": 21602, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: View changes size after device rotation", "creator": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium Studio, build: 2.1.0.201206172244\r\nTitanium SDK: 2.1.0.v20120618154152\r\nDevice: Motorola Xoom 4.0.3\r\n", "comment": { "comments": [ { "id": "241120", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I cannot reproduce output ,it shows \"Runtime error\".But when i replace \"currentWindow\" to \"createWindow\" it shows some output.\n\n1.Press Start button\n2.Rotate the device\n\nred square changes its size according to the\n\n buttonStart.addEventListener('click', function()\n{ \n view.startLayout();\n view.width = 75;\n view.height = 75;\n \n});\n\n\nBut red square changes its size only when rotation takes place (either landscape or portrait), it seems that its a bug. ", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-07T11:01:14.000+0000", "updated": "2013-03-07T11:01:14.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }