{ "id": "99374", "key": "TIMOB-10485", "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": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" }, { "id": "14098", "description": "Sprint 2012-18 API", "name": "Sprint 2012-18 API", "archived": true, "released": true, "releaseDate": "2012-09-10" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-09-03T03:53:36.000+0000", "created": "2012-08-17T11:02:19.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam", "api", "module_view", "qe-review", "qe-testadded" ], "versions": [ { "id": "13572", "description": "Release 2.1.1", "name": "Release 2.1.1", "archived": true, "released": true, "releaseDate": "2012-07-31" } ], "issuelinks": [ { "id": "23149", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "104987", "key": "TIMOB-11772", "fields": { "summary": "KitchenSink: Twitter - Last rows content disappears after device rotated to the landscape and vice versa 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 } } } } ], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-11-07T05:53:21.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": "h3. Problem description\r\nOn Android, 'e.source.size.height' and 'e.source.size.width' relative to a view nested inside another view, inside a tableViewRow, returns 0\r\n\r\nIssue it's only occurring on Android. On iOS correctly returns the right values.\r\n\r\nh3. Sample code and steps to reproduce\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor:'gray'\r\n});\r\n\r\nvar data = [];\r\n\r\nvar label = Ti.UI.createLabel({\r\n\ttext:'nel mezzo del cammin di nostra vita...'\r\n});\r\n\r\nvar view = Ti.UI.createView({\r\n\tbackgroundColor:'blue',\r\n\theight:Ti.UI.SIZE,\r\n\t// width:Ti.UI.SIZE,\r\n\twidth:210\r\n});\r\nview.addEventListener('postlayout',function(e){\r\n Ti.API.info('#### - ' + 'size.width: ' + e.source.size.width + ' - size.height: ' + e.source.size.height);\r\n });\r\n\r\nvar view2 = Ti.UI.createView({\r\n\tbackgroundColor:'orange',\r\n\theight:Ti.UI.SIZE,\r\n\t// width:Ti.UI.SIZE,\r\n\twidth:250\r\n});\r\n\r\nview.add(label);\r\nview2.add(view);\r\n\r\nvar tvr = Ti.UI.createTableViewRow({\r\n\tbackgroundColor:'yellow'\r\n});\r\ntvr.add(view2);\r\n\r\ndata.push(tvr);\r\n\r\nvar tv = Ti.UI.createTableView({\r\n\tdata:data\r\n});\r\n\r\n\r\nwin.add(tv);\r\n\r\nwin.open();\r\n{code} \r\n\r\n\r\nRun the sample code and check the log for the 'e.source.size.width' and 'e.source.size.height' values.\r\nChanging line 34 and just adding 'view' to the tableViewRow, then correct values are returned.\r\n", "attachment": [], "flagged": false, "summary": "Android: e.source.size of a view nested inside another view and in a tableViewRow, returns 0 ", "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": "Android OS \r\nTiSDK tested 2.1.1 GA", "comment": { "comments": [ { "id": "216391", "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.v20120827143312\r\nTested with Titanium  Studio: 2.1.2.201208201549\r\nDevice - Android 2.2 emulator\r\nMachine OS - MAC 10.7.3", "updateAuthor": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-27T23:21:04.000+0000", "updated": "2012-08-27T23:21:04.000+0000" }, { "id": "217322", "author": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening to update labels", "updateAuthor": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-03T03:52:52.000+0000", "updated": "2012-09-03T03:52:52.000+0000" }, { "id": "278610", "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/4887", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-07T05:53:21.000+0000", "updated": "2013-11-07T05:53:21.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }