{ "id": "94542", "key": "TIMOB-9905", "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": "13870", "description": "", "name": "Sprint 2012-16 API", "archived": true, "released": true, "releaseDate": "2012-08-13" }, { "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": "2013-06-19T11:13:26.000+0000", "created": "2012-07-06T15:46:32.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "api", "module_tableview", "qe-testadded" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "issuelinks": [], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-06-19T11:13:26.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": "Tableview does not get updated when a new view ( label, text area) is added to the tableviewrow. Works fine on iOS.\r\n\r\n1. Run the code below in app.js\r\n{code}\r\nvar _window = Ti.UI.createWindow({\r\n\t\r\n\tbackgroundColor:'#fff'\r\n});\r\n\r\n\trow = Ti.UI.createTableViewRow({\r\n\t\twidth: 300,\r\n\t\theight: 40\r\n\t});\r\n\t\r\n\r\n\tnameLabel = Titanium.UI.createLabel({\r\n\t\ttext: 'Title',\r\n\t\tleft: 10\r\n\t});\r\n\r\n\trow.add(nameLabel);\r\n\t\r\n\r\n\r\ntableView = Ti.UI.createTableView({\r\n\tbackgroundColor: 'white',\r\n\ttop: 0, width: 300,\r\n\theight: Ti.UI.SIZE,\r\n\tdata: [row]\r\n});\r\n\r\naddButton = Ti.UI.createButton({\r\n\ttitle: 'Add Label',\r\n\twidth: 200, height: 100\r\n});\r\n\r\n\r\naddButton.addEventListener('click', function() {\r\n\t\r\n\t\r\n\tvalueLabel1 = Ti.UI.createLabel({\r\n\t\t\t\ttext: 'New Label',\r\n\t\t\t\tright: 15,\r\n\t\t\t\twidth: 'auto'\r\n\t\t\t});\r\n\trow.add(valueLabel1);\r\n\tTi.API.info('self contents....'+row.children[1].text);\r\n\r\n});\r\n\r\n_window.add(tableView);\r\n_window.add(addButton);\r\n\r\n_window.open();\r\n{code}\r\n\r\nOn iOS, new label gets added to the tableview row.\r\nOn Android, label gets added to the tableview row ( info statement seen in ddms) but view not updated.\r\n\r\nWorkaround: Use setData() to reset the tableview rows. ( works fine on both iOS and Android)", "attachment": [], "flagged": false, "summary": "Android: Tableview not updated when a new view is added to a tableviewrow", "creator": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Ti SDK 2.1.0 and Android 2.3.3 and 4.0", "comment": { "comments": [ { "id": "202047", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "There are similar situations where update of table view doesn't trigger re-layout cycle automatically (like adding table view sections after table view is rendered), therefore developer has to do it programmatically (via setting same data: table.setData(table.data) ). It would be nice if developer wouldn't need to trigger re-layout programmatically.", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2012-07-09T00:17:29.000+0000", "updated": "2012-07-09T00:17:29.000+0000" }, { "id": "211273", "author": { "name": "ckao", "key": "ckao", "displayName": "Cindy Kao", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Client has come back and asked for this to take high priority as they are looking to submit their app to the App Store by 8/10. If you can come up with a work-around, we are also open to that as a solution.", "updateAuthor": { "name": "ckao", "key": "ckao", "displayName": "Cindy Kao", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-02T14:13:38.000+0000", "updated": "2012-08-02T14:13:38.000+0000" }, { "id": "213427", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Fixed by https://github.com/appcelerator/titanium_mobile/pull/2691", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-08-08T15:34:43.000+0000", "updated": "2012-08-08T15:34:43.000+0000" }, { "id": "213803", "author": { "name": "rumbrasas", "key": "rumbrasas", "displayName": "Rima Umbrasas", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed with \r\nmobile sdk-2.2.0.v20120810080115\r\nTitanium Studio, build: 2.1.1.201207271312\r\nGalaxy S III Android version 4.0.4", "updateAuthor": { "name": "rumbrasas", "key": "rumbrasas", "displayName": "Rima Umbrasas", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-10T11:26:15.000+0000", "updated": "2012-08-10T11:26:15.000+0000" }, { "id": "258521", "author": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Opened just to update the label", "updateAuthor": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-19T11:11:18.000+0000", "updated": "2013-06-19T11:11:18.000+0000" }, { "id": "258523", "author": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Label updated and verified \r\nTested on:\r\nDevice: Google Nexus Android Version 4.0.4, \r\nSDK:3.1.2.v20130617140100\r\nAppcelerator Studio: 3.1.1.201306131423\r\nOS: OSX 10.8\r\nacs:1.0.3\r\nalloy:1.1.3-cr\r\nnpm:1.2.14\r\ntitanium:3.1.1-cr\r\ntitanium-code-processor:1.0.1-cr5", "updateAuthor": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-19T11:13:26.000+0000", "updated": "2013-06-19T11:13:26.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }