{ "id": "94440", "key": "TIMOB-9994", "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": "13574", "description": "Sprint 2012-15 Core", "name": "Sprint 2012-15 Core", "archived": true, "released": true, "releaseDate": "2012-07-30" }, { "id": "14613", "description": "Release 2.1.4", "name": "Release 2.1.4", "archived": true, "released": true, "releaseDate": "2012-11-12" }, { "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-10-26T23:38:18.000+0000", "created": "2012-07-05T03:21:33.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "core", "layout", "module_label", "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" } ], "issuelinks": [ { "id": "22309", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "103680", "key": "TIMOB-11543", "fields": { "summary": "KitchenSink: Views - Missing label \"Show cancel Button\" 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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "22534", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "104405", "key": "TIMOB-11669", "fields": { "summary": "iOS: Label - postlayout events fired twice for labels.", "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": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-11-07T05:27:49.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": "On android no postlayout event is fired.\r\nOn iOS, the postlayout event is fired once after adding the label to the window.\r\nIf you change label properties, for example width, you can see that the properties are changed but no postlayout event is fired.\r\nThe code snippet below is my simple testcase.\r\n\r\n\r\n{code:title=app.js|borderStyle=solid}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor : '#FFF',\r\n layout : 'vertical'\r\n});\r\n\r\nvar label = Ti.UI.createLabel({\r\n text : \"hello\",\r\n left : 0,\r\n width : Ti.UI.SIZE,\r\n height : Ti.UI.SIZE\r\n});\r\n\r\nlabel.addEventListener(\"postlayout\", function(e) {\r\n Ti.API.info(\"label postlayout\");\r\n //alert(\"label post layout\");\r\n});\r\n\r\nvar doBtn = Ti.UI.createButton({\r\n title : \"do\",\r\n width : Ti.UI.SIZE,\r\n height : Ti.UI.SIZE\r\n});\r\n\r\ndoBtn.addEventListener(\"click\", function() {\r\n label.text = \"new text\";\r\n label.backgroundColor = '#F00';\r\n label.left += 20;\r\n\r\n});\r\nwin.add(doBtn);\r\nwin.add(label);\r\nwin.open(); \r\n{code}", "attachment": [ { "id": "30158", "filename": "app.js", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-30T18:41:37.000+0000", "size": 3619, "mimeType": "text/javascript" } ], "flagged": false, "summary": "Android: postlayout event not fired for labels", "creator": { "name": "psylo", "key": "psylo", "displayName": "FabianS", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "psylo", "key": "psylo", "displayName": "FabianS", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "2.1.0GA", "comment": { "comments": [ { "id": "201544", "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-07-05T05:23:06.000+0000", "updated": "2012-07-05T05:23:06.000+0000" }, { "id": "210614", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Test notes:\r\n\r\nI have attached an app.js with 12 test cases for the post layout event. At the very bottom of the app.js file, there are 3 groups of controls that you need to test. To make things easier to read, I would recommend running the app three times, each with a different group enabled. Each time you run the app, verify that the postlayout event prints out at least once for each control enabled (the postlayout event may be fired multiple times).\r\n\r\nBefore my change, postlayout events don't fire for any of these controls", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-30T18:40:56.000+0000", "updated": "2012-07-30T18:40:56.000+0000" }, { "id": "210709", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Fixed by PR https://github.com/appcelerator/titanium_mobile/pull/2660 against master", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-07-31T10:10:36.000+0000", "updated": "2012-07-31T10:10:36.000+0000" }, { "id": "214739", "author": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Environment used for verification -\r\nTested with Titanium SDK: 2.2.0.v20120815194913\r\nTested with Titanium  Studio: 2.1.1.201207271312\r\nDevice - Samsung GALAXY Note Android 2.3.6\r\nMachine OS - MAC 10.7.3", "updateAuthor": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-16T00:01:12.000+0000", "updated": "2012-08-16T00:01:12.000+0000" }, { "id": "217947", "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-07T00:12:40.000+0000", "updated": "2012-09-07T00:12:40.000+0000" }, { "id": "225219", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Backport: https://github.com/appcelerator/titanium_mobile/pull/3344", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-26T23:06:58.000+0000", "updated": "2012-10-26T23:06:58.000+0000" }, { "id": "225232", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "reopen to update fix versions.", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-26T23:36:50.000+0000", "updated": "2012-10-26T23:36:50.000+0000" }, { "id": "225784", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with 2.1.4.v20121030173408 on Droid 3 2.3.4", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-11-01T16:37:14.000+0000", "updated": "2012-11-01T16:37:14.000+0000" }, { "id": "278583", "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/4787", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-07T05:27:49.000+0000", "updated": "2013-11-07T05:27:49.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }