{ "id": "174897", "key": "TIMOB-27838", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": "21052", "description": "", "name": "Release 9.3.0", "archived": false, "released": true, "releaseDate": "2020-12-14" } ], "resolution": null, "resolutiondate": null, "created": "2020-04-08T15:20:57.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "android", "tableview" ], "versions": [], "issuelinks": [ { "id": "58438", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "173620", "key": "TIMOB-27077", "fields": { "summary": "Android: Rewrite Ti.UI.TableView to use RecyclerView", "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": "Medium", "id": "3" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-11-20T00:25:01.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": "If you use the normal table headerTitle you have no option to style the text or create a headerView. This PR gives you at least the option to set a background/font color, border and text style using XML ressource files.\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: \"#fff\"\r\n});\r\n\r\nvar sectionFruit = Ti.UI.createTableViewSection({\r\n\theaderTitle: 'Fruit'\r\n});\r\nsectionFruit.add(Ti.UI.createTableViewRow({\r\n\ttitle: 'Apples',\r\n\tcolor: \"#000\"\r\n}));\r\nsectionFruit.add(Ti.UI.createTableViewRow({\r\n\ttitle: 'Bananas',\r\n\tcolor: \"#000\"\r\n}));\r\n\r\nvar sectionVeg = Ti.UI.createTableViewSection({\r\n\theaderTitle: 'Vegetables'\r\n});\r\nsectionVeg.add(Ti.UI.createTableViewRow({\r\n\ttitle: 'Carrots',\r\n\tcolor: \"#000\"\r\n}));\r\nsectionVeg.add(Ti.UI.createTableViewRow({\r\n\ttitle: 'Potatoes',\r\n\tcolor: \"#000\"\r\n}));\r\n\r\nvar table = Ti.UI.createTableView({\r\n\tdata: [sectionFruit, sectionVeg]\r\n});\r\n\r\nwin.add(table);\r\nwin.open();\r\n\r\nvar sectionFish = Ti.UI.createTableViewSection({\r\n\theaderTitle: 'Fish'\r\n});\r\nsectionFish.add(Ti.UI.createTableViewRow({\r\n\ttitle: 'Cod',\r\n\tcolor: \"#000\"\r\n}));\r\nsectionFish.add(Ti.UI.createTableViewRow({\r\n\ttitle: 'Haddock',\r\n\tcolor: \"#000\"\r\n}));\r\n\r\ntable.insertSectionBefore(0, sectionFish);\r\n{code}\r\n\r\napp/platform/android/res/values/colors.xml\r\n\r\n\r\n{code:xml}\r\n\r\n\r\n #ff000000\r\n\r\n{code}\r\n\r\n\r\napp/platform/android/res/values/dimens.xml\r\n\r\n\r\n{code:xml}\r\n\r\n\r\n 16sp\r\n\r\n{code}\r\n\r\n\r\napp/platform/android/res/values/strings.xml\r\n\r\n\r\n{code:xml}\r\n\r\n\r\n bold\r\n\r\n{code}\r\n\r\n\r\napp/platform/android/res/drawable/titantium_ui_header_title_background.xml\r\n\r\n\r\n{code:xml}\r\n\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\r\n{code}\r\n\r\n\r\n\r\n", "attachment": [ { "id": "67328", "filename": "68747470733a2f2f6d6967617765622e64652f74695f74626c312e706e67.png", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-04-08T15:19:58.000+0000", "size": 14475, "mimeType": "image/png" }, { "id": "67327", "filename": "68747470733a2f2f6d6967617765622e64652f74695f74626c322e706e67.png", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-04-08T15:19:58.000+0000", "size": 13853, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: Style default tableViewSection headerTitle using XML", "creator": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "closedSprints": [ { "id": 1201, "state": "closed", "name": "2020 Sprint 14", "startDate": "2020-07-06T15:40:00.000Z", "endDate": "2020-07-17T15:40:00.000Z", "completeDate": "2020-07-20T22:16:28.367Z", "originBoardId": 114 }, { "id": 1202, "state": "closed", "name": "2020 Sprint 15", "startDate": "2020-07-20T22:16:05.601Z", "endDate": "2020-07-31T22:16:00.000Z", "completeDate": "2020-08-03T20:27:12.585Z", "originBoardId": 114 }, { "id": 1203, "state": "closed", "name": "2020 Sprint 16", "startDate": "2020-08-03T20:57:55.114Z", "endDate": "2020-08-14T20:57:00.000Z", "completeDate": "2020-08-14T15:19:51.647Z", "originBoardId": 114 }, { "id": 1204, "state": "closed", "name": "2020 Sprint 17", "startDate": "2020-08-17T15:48:00.000Z", "endDate": "2020-08-28T15:48:00.000Z", "completeDate": "2020-08-31T15:36:28.040Z", "originBoardId": 114 }, { "id": 1205, "state": "closed", "name": "2020 Sprint 18", "startDate": "2020-08-31T15:45:10.220Z", "endDate": "2020-09-11T15:45:00.000Z", "completeDate": "2020-09-11T19:56:20.674Z", "originBoardId": 114 }, { "id": 1206, "state": "closed", "name": "2020 Sprint 19", "startDate": "2020-09-14T20:01:00.000Z", "endDate": "2020-09-25T20:01:00.000Z", "completeDate": "2020-09-28T15:30:19.875Z", "originBoardId": 114 }, { "id": 1207, "state": "closed", "name": "2020 Sprint 20", "startDate": "2020-09-28T15:30:47.481Z", "endDate": "2020-10-09T15:30:00.000Z", "completeDate": "2020-10-09T16:33:43.453Z", "originBoardId": 114 }, { "id": 1208, "state": "closed", "name": "2020 Sprint 21", "startDate": "2020-10-12T16:34:00.000Z", "endDate": "2020-10-23T16:34:00.000Z", "completeDate": "2020-10-23T02:32:43.674Z", "originBoardId": 114 }, { "id": 1209, "state": "closed", "name": "2020 Sprint 22", "startDate": "2020-10-27T02:33:00.000Z", "endDate": "2020-11-07T02:33:00.000Z", "completeDate": "2020-11-06T17:45:42.610Z", "originBoardId": 114 }, { "id": 1210, "state": "closed", "name": "2020 Sprint 23", "startDate": "2020-11-09T17:49:00.000Z", "endDate": "2020-11-20T17:49:00.000Z", "completeDate": "2020-11-20T17:46:00.641Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "455024", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/11592", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-04-08T15:24:49.000+0000", "updated": "2020-04-08T15:24:49.000+0000" }, { "id": "455902", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~michael], you raise a good point. A section header's text color, background color, etc. are currently hard-coded. This is not a good thing and it ignores the custom theme that might be applied to the app.\r\n\r\nWe're actually completely rewriting {{TableView}} to use the Java {{RecylcerView}} class for 9.1.0, as can be seen in [TIMOB-27077]. It has a new \"titanium_ui_tableview_holder.xml\" file which defines the styles for all headers, row titles, and footers. I think this will do what you want. We should double-check this when testing the PR.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-06-20T03:56:23.000+0000", "updated": "2020-06-20T03:56:23.000+0000" }, { "id": "455905", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "Sounds great!", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-06-20T07:44:39.000+0000", "updated": "2020-06-20T07:44:39.000+0000" }, { "id": "456021", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "https://github.com/appcelerator/titanium_mobile/pull/11556", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-07-08T07:43:46.000+0000", "updated": "2020-07-08T07:43:46.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }