{ "id": "93483", "key": "TIMOB-9640", "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": "13418", "description": "Sprint 2012-13 Core", "name": "Sprint 2012-13 Core", "archived": true, "released": true, "releaseDate": "2012-07-01" }, { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-09-11T04:22:29.000+0000", "created": "2012-06-19T13:26:39.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "core", "module_tableview", "parity", "qe-review", "qe-testadded" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "issuelinks": [ { "id": "19988", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "99350", "key": "TIMOB-10477", "fields": { "summary": "Android: The app crashes on launch on Android", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "21579", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "102239", "key": "TIMOB-11176", "fields": { "summary": "iOS: TableView - Postlayout table event fired 3 times", "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": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-12-10T06:12:05.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. Problem description\r\n'postlayout' event is not fired on Android\r\n\r\nh2. Sample code to reproduce\r\nRun the sample code below. 'postlayout' event it's not fired only on Android OS.\r\niOS works fine.\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor:'white',\r\n\ttitle:'test',\r\n\tmodal:true\r\n});\r\n\r\nvar data1 = [];\r\n\r\nvar tvr = Ti.UI.createTableViewRow({\r\n\ttitle:'pippo',\r\n\thasChild:true\r\n});\r\ndata1.push(tvr);\r\n\r\nvar table = Ti.UI.createTableView({\r\n\ttop: 10,\r\n\tleft: 10,\r\n\twidth: 200, \r\n\theight: 200,\r\n\tscrollable: false,\r\n\tborderRadius: 10,\r\n\tbackgroundColor: 'white',\r\n\tdata : data1\r\n});\r\ntable.addEventListener('postlayout', function() {\r\n\tsetTimeout(function(){\r\n\t\tTi.API.info('#### postlayout table event received.');\r\n\t\talert('postlayout table event fired');\r\n\t},600);\r\n});\r\nwin.add(table);\r\n\r\n\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: 'postlayout' event is not triggered", "creator": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK tested: 2.0 GA and 2.1 latest CI\r\nAndroid OS", "comment": { "comments": [ { "id": "200150", "author": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR pending https://github.com/appcelerator/titanium_mobile/pull/2467", "updateAuthor": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-25T14:33:45.000+0000", "updated": "2012-06-25T14:33:45.000+0000" }, { "id": "200250", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Still doesn't work as expected for window. Before, \"postlayout\" event wasn't fired, now it's being fired twice. Here is my test case:\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: '#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\tdata.push({ title:'Row #'+i });\r\n}\r\ntable.setData(data);\r\n\r\nwin.addEventListener('postlayout', function() {\r\n\tTi.API.info('Postlayout event fired!');\r\n});\r\n\r\nwin.open();\r\n{code}\r\n\r\n\r\nTested on Android 3.1 device with latest CI build.", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2012-06-26T05:12:07.000+0000", "updated": "2012-06-26T05:12:07.000+0000" }, { "id": "200327", "author": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Ivan, the behavior you describe is unrelated to this ticket. \r\nI tested your example before (which is current master) and after (after applying PR 2467), it behaves identically by double firing postlayout.\r\nPlease create a separate JIRA.\r\n", "updateAuthor": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-26T10:43:05.000+0000", "updated": "2012-06-26T10:43:05.000+0000" }, { "id": "200512", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2012-06-27T01:33:30.000+0000", "updated": "2012-06-27T01:33:30.000+0000" }, { "id": "216231", "author": { "name": "tsmolich", "key": "tsmolich", "displayName": "Tamila Smolich", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as fixed. Tested and verified on:\r\nTitanium Studio, build: 2.1.2.201208201549\r\nTitanium SDK, build: 2.2.0.v20120824175712\r\nDevices: Nexus S (4.1.1), HTC Evo (4.0.3)", "updateAuthor": { "name": "tsmolich", "key": "tsmolich", "displayName": "Tamila Smolich", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-27T11:35:05.000+0000", "updated": "2012-08-27T11:35:05.000+0000" }, { "id": "218346", "author": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Reopening to update labels", "updateAuthor": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2012-09-11T04:21:48.000+0000", "updated": "2012-09-11T04:21:48.000+0000" }, { "id": "283484", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Anvil testcase PR https://github.com/appcelerator/titanium_mobile/pull/5003\n", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-10T06:12:05.000+0000", "updated": "2013-12-10T06:12:05.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }