{ "id": "116959", "key": "TIMOB-14496", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": "16593", "description": "Release 4.0.0", "name": "Release 4.0.0", "archived": false, "released": true, "releaseDate": "2015-05-21" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-12-01T23:58:02.000+0000", "created": "2013-07-08T19:54:39.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "docs", "headerview", "tableviewsection" ], "versions": [], "issuelinks": [], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2015-03-12T17:34:57.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": "Currently, it is only possible to set the *headerView* of a TableViewSection at creation-time in Android.\r\n\r\nIt would be great to use the *setHeaderView* method for Android too. In the Docs there is no note that this method is not available in Android: [http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.TableViewSection-method-setHeaderView].\r\n\r\nThere is only a hint at the *headerView* property description (_\"On Android, must be set at creation.\"_): [http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.TableViewSection-property-headerView]\r\n\r\nQ&A: [http://developer.appcelerator.com/question/154498/alloy-how-to-set-controller-as-headerview-to-tableviewsection-in-android]\r\n", "attachment": [], "flagged": false, "summary": "Android: setHeaderView for Titanium.UI.TableViewSection", "creator": { "name": "manuellehner", "key": "manuellehner", "displayName": "Manuel Lehner", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "manuellehner", "key": "manuellehner", "displayName": "Manuel Lehner", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Titanium SDK 3.1.1.GA", "closedSprints": [ { "id": 258, "state": "closed", "name": "2014 Sprint 24 SDK", "startDate": "2014-11-24T22:28:25.425Z", "endDate": "2014-12-06T01:00:00.000Z", "completeDate": "2014-12-08T17:21:15.171Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "301236", "author": { "name": "manuellehner", "key": "manuellehner", "displayName": "Manuel Lehner", "active": true, "timeZone": "Europe/Berlin" }, "body": "Here is a simple test case:\r\n\r\n{code:javascript}\r\nTi.UI.backgroundColor = 'white';\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar fruitHeader = Ti.UI.createView({\r\n width: Ti.UI.FILL,\r\n height: 50,\r\n backgroundColor: 'blue'\r\n});\r\n\r\n// setting headerView at creation works\r\nvar sectionFruit = Ti.UI.createTableViewSection({ headerView: fruitHeader });\r\nsectionFruit.add(Ti.UI.createTableViewRow({ title: 'Apples' }));\r\nsectionFruit.add(Ti.UI.createTableViewRow({ title: 'Bananas' }));\r\n\r\nvar vegHeader = Ti.UI.createView({\r\n width: Ti.UI.FILL,\r\n height: 50,\r\n backgroundColor: 'red'\r\n});\r\n\r\n// setting headerView after creation fails\r\nvar sectionVeg = Ti.UI.createTableViewSection();\r\n\r\nsectionVeg.setHeaderView(vegHeader); // Uncaught TypeError: Object # has no method 'setHeaderView' \r\n\r\nsectionVeg.add(Ti.UI.createTableViewRow({ title: 'Carrots' }));\r\nsectionVeg.add(Ti.UI.createTableViewRow({ title: 'Potatoes' }));\r\n\r\nvar table = Ti.UI.createTableView({\r\n data: [sectionFruit, sectionVeg]\r\n});\r\n\r\nwin.add(table);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "manuellehner", "key": "manuellehner", "displayName": "Manuel Lehner", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-04-17T10:10:36.000+0000", "updated": "2014-04-17T10:10:36.000+0000" }, { "id": "301238", "author": { "name": "manuellehner", "key": "manuellehner", "displayName": "Manuel Lehner", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/5619", "updateAuthor": { "name": "manuellehner", "key": "manuellehner", "displayName": "Manuel Lehner", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-04-17T11:51:09.000+0000", "updated": "2014-04-17T11:51:09.000+0000" }, { "id": "327591", "author": { "name": "manuellehner", "key": "manuellehner", "displayName": "Manuel Lehner", "active": true, "timeZone": "Europe/Berlin" }, "body": "I can't edit the issue. Type should be Bug.\r\n\r\nCan this bugfix be reviewed?", "updateAuthor": { "name": "manuellehner", "key": "manuellehner", "displayName": "Manuel Lehner", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-10-10T11:51:43.000+0000", "updated": "2014-10-10T11:51:43.000+0000" }, { "id": "327630", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thank you for the PR. We will review it shortly. Since you are adding functionality, it isn't a bug, but an improvement. I've marked it as such. Thanks!", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-10T17:55:20.000+0000", "updated": "2014-10-10T17:55:20.000+0000" }, { "id": "327642", "author": { "name": "manuellehner", "key": "manuellehner", "displayName": "Manuel Lehner", "active": true, "timeZone": "Europe/Berlin" }, "body": "Thanks, Ingo. But isn't this a bug? (since *setHeaderView* is a documented method)\r\n\r\n{code}(Uncaught TypeError: Object # has no method 'setHeaderView'){code} \r\n\r\nMaybe I missed to add expected and actual result in the description. But I added a test case as comment to reproduce the bug. And since my PR actually fixes the bug it isn't really an improvement, isn't it? It simply adds the missing property accessors to give the expected result for the above test case.", "updateAuthor": { "name": "manuellehner", "key": "manuellehner", "displayName": "Manuel Lehner", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-10-10T18:54:45.000+0000", "updated": "2014-10-10T18:55:14.000+0000" }, { "id": "345856", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed using:\r\n\r\nTitanium SDK 4.0.0.v20150312092612\r\nStudio 4.0.0.201503062102\r\nCLI 3.4.2\r\nXcode 6.2\r\nNode 0.12\r\n\r\nsetHeaderView called without error.", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-03-12T17:34:57.000+0000", "updated": "2015-03-12T17:34:57.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }