{ "id": "118553", "key": "TIMOB-15249", "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": "20115", "name": "Release 7.3.0", "archived": false, "released": true, "releaseDate": "2018-08-17" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-05-21T20:07:37.000+0000", "created": "2013-08-15T08:17:21.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "android", "footerview", "headerview", "tableview" ], "versions": [], "issuelinks": [], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-07-02T21:18:10.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": "In contrast with iOS, on Android the {{headerView}} and {{footerView}} of a {{TableView}} cannot be removed or resized ({{height}}) after once the window is opened and the table layed out.\r\n\r\nSince the [docs|http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.TableView] do not mention any platform differences, I'd expect this to work on Android like it does on iOS.\r\n\r\nh1. Steps to reproduce\r\n\r\n# Create a new project: {{titanium create -p ios,android -n testHeader -d . --id test.header}}\r\n# For {{app.js}} use:\r\n {code}\r\n var w = Ti.UI.createWindow({\r\n backgroundColor: 'white'\r\n });\r\n\r\n var t = Ti.UI.createTableView({\r\n data: [\r\n { title: 'One' },\r\n { title: 'Two' },\r\n { title: 'Three' },\r\n { title: 'Four' },\r\n { title: 'Five' }\r\n ]\r\n });\r\n\r\n var h = Ti.UI.createView({\r\n backgroundColor: 'red',\r\n height: 100,\r\n width: Ti.UI.FILL\r\n });\r\n\r\n h.addEventListener('click', function () {\r\n h.height = 50;\r\n f.height = 50;\r\n });\r\n\r\n var f = Ti.UI.createView({\r\n backgroundColor: 'green',\r\n height: 100,\r\n width: Ti.UI.FILL\r\n });\r\n\r\n f.addEventListener('click', function () {\r\n t.headerView = null;\r\n t.footerView = null;\r\n });\r\n\r\n t.headerView = h;\r\n t.footerView = f;\r\n\r\n w.add(t);\r\n w.open();\r\n {code}\r\n# Run the app on both Android and iOS devices.\r\n# Tap the red headerView and notice that only on iOS it resizes both the header and footerView.\r\n# Tap the green footerView and notice that only on iOS it removes both the header and footerView.", "attachment": [ { "id": "42465", "filename": "device-2013-09-13-163711.png", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-09-13T14:37:31.000+0000", "size": 14310, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: TableView header and footer cannot be removed or resized dynamically", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "SDK 3.1.1, 3.1.2.GA, 3.1.3.RC (updated version)\r\nAndroid 4.1.2 on Samsung Galaxy S2\r\nAndroid 2.3.3 in x86 simulator\r\nMac OS X 10.8.4", "closedSprints": [ { "id": 1028, "state": "closed", "name": "2018 Sprint 09 SDK", "startDate": "2018-04-22T22:53:08.928Z", "endDate": "2018-05-06T22:53:00.000Z", "completeDate": "2018-05-07T00:02:15.883Z", "originBoardId": 114 }, { "id": 1018, "state": "closed", "name": "2018 Sprint 07 SDK", "startDate": "2018-03-25T21:59:36.637Z", "endDate": "2018-04-08T21:59:00.000Z", "completeDate": "2018-04-08T17:55:14.467Z", "originBoardId": 114 }, { "id": 1034, "state": "closed", "name": "2018 Sprint 10 SDK", "startDate": "2018-05-07T00:03:21.636Z", "endDate": "2018-05-21T00:03:00.000Z", "completeDate": "2018-05-20T20:54:58.928Z", "originBoardId": 114 }, { "id": 1035, "state": "closed", "name": "2018 Sprint 11 SDK", "startDate": "2018-05-20T20:57:43.542Z", "endDate": "2018-06-03T20:57:00.000Z", "completeDate": "2018-06-04T15:13:14.425Z", "originBoardId": 114 }, { "id": 1021, "state": "closed", "name": "2018 Sprint 08 SDK", "startDate": "2018-04-08T17:57:36.122Z", "endDate": "2018-04-22T17:57:00.000Z", "completeDate": "2018-04-22T22:51:19.120Z", "originBoardId": 114 }, { "id": 1008, "state": "closed", "name": "2018 Sprint 06 SDK", "startDate": "2018-03-11T22:18:04.396Z", "endDate": "2018-03-25T22:18:00.000Z", "completeDate": "2018-03-25T21:52:36.683Z", "originBoardId": 216 } ], "comment": { "comments": [ { "id": "271050", "author": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hi Fokke Zandbergen,\n\nPlease provide me some sample code or snapshot of the table view so that i can understand and fix this bug. And i think if you not set header and footer it will be not set or if you set this you can remove this simple.\n\nThanks,", "updateAuthor": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2013-09-13T12:25:28.000+0000", "updated": "2013-09-13T12:25:28.000+0000" }, { "id": "271061", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Updated with test case and screenshot.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-09-13T14:40:16.000+0000", "updated": "2013-09-13T14:40:16.000+0000" }, { "id": "271076", "author": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hi Fokke Zandbergen,\nYou can use this code where header and footer has removed, \n\n{code}\nvar w = Ti.UI.createWindow({\n backgroundColor: 'white'\n});\n \nvar t = Ti.UI.createTableView({\n data: [\n { title: 'One' },\n { title: 'Two' },\n { title: 'Three' },\n { title: 'Four' },\n { title: 'Five' }\n ]\n});\n \n \nw.add(t);\nw.open();\n\n{code}\n\nAnd if you want to re-sized the header and footer just decrease the height of f and h view.\nThanks,", "updateAuthor": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2013-09-13T17:03:30.000+0000", "updated": "2013-09-13T17:03:30.000+0000" }, { "id": "271082", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "So your solution is NOT to use headerView and footerView? I don't think that's a valid solution.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-09-13T17:27:25.000+0000", "updated": "2013-09-13T17:27:25.000+0000" }, { "id": "271084", "author": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hi Fokke Zandbergen,\nThis code is used header and footer and that re-sized. You can test this.\n{code}\nvar w = Ti.UI.createWindow({\n backgroundColor: 'white'\n});\n \nvar t = Ti.UI.createTableView({\n data: [\n { title: 'One' },\n { title: 'Two' },\n { title: 'Three' },\n { title: 'Four' },\n { title: 'Five' }\n ]\n});\n \nvar h = Ti.UI.createView({\n backgroundColor: 'red',\n height: 25,\n width: Ti.UI.FILL\n});\n \nh.addEventListener('click', function () {\n h.height = 50;\n f.height = 50;\n});\n \nvar f = Ti.UI.createView({\n backgroundColor: 'green',\n height: 25,\n width: Ti.UI.FILL\n});\n \nf.addEventListener('click', function () {\n t.headerView = null;\n t.footerView = null;\n});\n \nt.headerView = h;\nt.footerView = f;\n \nw.add(t);\nw.open();\n{code} \nThanks", "updateAuthor": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2013-09-13T17:51:31.000+0000", "updated": "2013-09-13T17:51:31.000+0000" }, { "id": "271167", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "[~morahman] the only difference between your code and mine in the ticket's description is that you've set the header and footerView's height to 25 on creation.\n\nThe very point of this ticket is that on iOS you can change the height of the views after the table has been created and even remove them. On Android this does not work.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-09-15T13:25:54.000+0000", "updated": "2013-09-15T13:25:54.000+0000" }, { "id": "423454", "author": { "name": "s.volkov", "key": "s.volkov", "displayName": "Sergey Volkov", "active": true, "timeZone": "Europe/Moscow" }, "body": "https://github.com/appcelerator/titanium_mobile/pull/9193", "updateAuthor": { "name": "s.volkov", "key": "s.volkov", "displayName": "Sergey Volkov", "active": true, "timeZone": "Europe/Moscow" }, "created": "2017-07-04T16:18:39.000+0000", "updated": "2017-07-04T16:18:39.000+0000" }, { "id": "437837", "author": { "name": "s.volkov", "key": "s.volkov", "displayName": "Sergey Volkov", "active": true, "timeZone": "Europe/Moscow" }, "body": "{quote}Summary\r\n< Android: headerView & footerView cannot be removed or resized after creation\r\n---\r\n> Android: TableView header and footer cannot be added/removed dynamically{quote}\r\n\r\nThere was problem with resizing (fixed in [79e33e1|https://github.com/appcelerator/titanium_mobile/pull/9193/commits/79e33e19f9cbb54a62bc2074873dc78147a053d7]) and adding always worked.\r\nCurrent ticket title is incorrect.", "updateAuthor": { "name": "s.volkov", "key": "s.volkov", "displayName": "Sergey Volkov", "active": true, "timeZone": "Europe/Moscow" }, "created": "2018-05-22T09:01:56.000+0000", "updated": "2018-05-22T09:01:56.000+0000" }, { "id": "437853", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~s.volkov], it sounds like it needs to be re-tested to prove that resizes work. Once proven, we'll update the title.\r\n\r\n[~smohammed], can you re-run the following resize test please? It's the one where you tap the red button. Thanks.\r\nhttps://github.com/appcelerator/titanium_mobile/pull/9193#issuecomment-314890439\r\n", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-05-22T18:02:58.000+0000", "updated": "2018-05-22T18:02:58.000+0000" }, { "id": "437854", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~jquick] Using SDK build {{7.3.0.v20180522085724}} and running the test case mentioned in https://github.com/appcelerator/titanium_mobile/pull/9193#issuecomment-314890439. The headerView and footerView resize when pressing the red button. ", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-05-22T18:16:10.000+0000", "updated": "2018-05-22T18:16:10.000+0000" }, { "id": "437863", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I've also confirmed that header/footer can be added and replaced dynamically as well. So, this was just a removal and resize issue. Thanks everyone.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-05-23T00:30:17.000+0000", "updated": "2018-05-23T00:30:17.000+0000" }, { "id": "438939", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix in SDK 7.3.0.v20180628132121.\r\nClosing.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-07-02T21:18:05.000+0000", "updated": "2018-07-02T21:18:05.000+0000" } ], "maxResults": 13, "total": 13, "startAt": 0 } } }