{ "id": "93963", "key": "TIMOB-9816", "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": "11258", "description": "Holding Pen for Triaged Issues", "name": "Backlog", "archived": false, "released": false } ], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2014-02-08T04:23:42.000+0000", "created": "2012-06-27T01:32:46.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "core", "ipass1" ], "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": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "updated": "2018-08-06T17:37:01.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": "h2. The problem\r\n\r\nTiWindow fires \"postlayout\" event twice. To see that issue, run this example:\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n    backgroundColor: '#ccc'\r\n});\r\n \r\nvar table = Ti.UI.createTableView();\r\n \r\nwin.add(table);\r\n \r\nvar data = [];\r\nfor(var i = 0; i < 500; i++){\r\n    data.push({ title:'Row #'+i });\r\n}\r\ntable.setData(data);\r\n \r\nwin.addEventListener('postlayout', function() {\r\n    Ti.API.info('Postlayout event fired!');\r\n});\r\n \r\nwin.open();\r\n{code}\r\n\r\nIn console output, you should see two infos, meaning event gets fired twice.\r\n\r\nh2. Expected result\r\n\r\n\"postlayout\" event should be fired only once.", "attachment": [], "flagged": false, "summary": "Android: TiWindow fires \"postlayout\" event twice", "creator": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "* Titanium SDK version: 2.1.0 (06/26/12 16:41 0d08929)\r\n* v8\r\n* Android 3.1\r\n* Thinkpad Tablet\r\n* OSX Lion", "comment": { "comments": [ { "id": "243120", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The problem reproduces with release 3.0.2 and master release 3.1.0\n\ntested on\n\nTitanium Studio, build: 3.0.2.201302191606\nTitanium SDK version: 3.1.0 \nTitanium SDK version: 3.0.2 \nDevice: Samsung galaxy s duos Android version: 4.0.4\nAndroid Emulator: Android SDK version: 2.2", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-20T06:57:07.000+0000", "updated": "2013-03-20T06:57:07.000+0000" }, { "id": "292039", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "'postlayout' is fired whenever a layout is done and there are many cases where a layout will required. 'postlayout' is not a one time event, it could be fired multiple times.", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-02-08T04:23:42.000+0000", "updated": "2014-02-08T04:23:42.000+0000" }, { "id": "439910", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as invalid. If incorrect, please reopen.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-06T17:37:01.000+0000", "updated": "2018-08-06T17:37:01.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }