{ "id": "176181", "key": "TIMOB-28438", "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": "21050", "name": "Release 10.0.0", "archived": false, "released": true, "releaseDate": "2021-05-17" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2021-05-07T18:42:30.000+0000", "created": "2021-05-05T21:49:21.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "TableView", "android", "regression" ], "versions": [ { "id": "21050", "name": "Release 10.0.0", "archived": false, "released": true, "releaseDate": "2021-05-17" } ], "issuelinks": [], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2021-05-07T18:42:30.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": "h5.Steps to reproduce:\r\n1. Use the below code in your app.js:\r\n{code}\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar RED = 'Red',\r\n GREEN = 'Green',\r\n PURPLE = 'Purple';\r\n\r\nvar table = Ti.UI.createTableView({\r\n});\r\n\r\nvar tableSection1 = createSectionForGroup(RED);\r\nvar tableSection2 = createSectionForGroup(GREEN);\r\nvar tableSection3 = createSectionForGroup(PURPLE);\r\nvar tableSection4 = createSectionForGroup(PURPLE);\r\nvar tableSection5 = createSectionForGroup(RED);\r\nvar tableSection6 = createSectionForGroup(GREEN);\r\nvar tableSection7 = createSectionForGroup(PURPLE);\r\nvar tableSection8 = createSectionForGroup(PURPLE);\r\nvar tableSection9 = createSectionForGroup(RED);\r\nvar tableSection10 = createSectionForGroup(GREEN);\r\nvar tableSection11 = createSectionForGroup(PURPLE);\r\nvar tableSection12 = createSectionForGroup(PURPLE);\r\n\r\nvar tableRow = Ti.UI.createTableViewRow({\r\n title: 'Row'\r\n});\r\n\r\nvar rows = 7;\r\nvar i;\r\nfor (i = 0; i <= rows; i++) {\r\n tableSection1.add(tableRow);\r\n}\r\n\r\nfor (i = 0; i <= rows; i++) {\r\n tableSection2.add(tableRow);\r\n}\r\n\r\nfor (i = 0; i <= rows; i++) {\r\n tableSection3.add(tableRow);\r\n}\r\n\r\nfor (i = 0; i <= rows; i++) {\r\n tableSection4.add(tableRow);\r\n}\r\n\r\nfor (i = 0; i <= rows; i++) {\r\n tableSection5.add(tableRow);\r\n}\r\n\r\nfor (i = 0; i <= rows; i++) {\r\n tableSection6.add(tableRow);\r\n}\r\n\r\nfor (i = 0; i <= rows; i++) {\r\n tableSection7.add(tableRow);\r\n}\r\n\r\nfor (i = 0; i <= rows; i++) {\r\n tableSection8.add(tableRow);\r\n}\r\n\r\nfor (i = 0; i <= rows; i++) {\r\n tableSection9.add(tableRow);\r\n}\r\n\r\nfor (i = 0; i <= rows; i++) {\r\n tableSection10.add(tableRow);\r\n}\r\n\r\nfor (i = 0; i <= rows; i++) {\r\n tableSection11.add(tableRow);\r\n}\r\n\r\nfor (i = 0; i <= rows; i++) {\r\n tableSection12.add(tableRow);\r\n}\r\n\r\ntable.setData([tableSection1, tableSection2, tableSection3, tableSection4, tableSection5, tableSection6, tableSection7, tableSection8,\r\n tableSection9, tableSection10, tableSection11, tableSection12\r\n]);\r\n\r\nfunction createSectionForGroup(group) {\r\n var headerContainerOpts, headerBottomBorderOpts, headerViewOpts;\r\n\r\n headerViewOpts = {\r\n color: 'white',\r\n height: Ti.UI.SIZE,\r\n font: {\r\n fontSize: '17sp',\r\n fontWeight: 'bold'\r\n },\r\n left: 11,\r\n text: group\r\n };\r\n\r\n if (group === RED) {\r\n headerContainerOpts = {\r\n backgroundGradient: {\r\n endPoint: {\r\n x: 0,\r\n y: '100%'\r\n },\r\n startPoint: {\r\n x: 0,\r\n y: 0\r\n },\r\n type: 'linear',\r\n colors: ['#C53019', '#B32D14']\r\n },\r\n height: 32\r\n };\r\n }\r\n if (group === GREEN) {\r\n headerContainerOpts = {\r\n backgroundGradient: {\r\n endPoint: {\r\n x: 0,\r\n y: '100%'\r\n },\r\n startPoint: {\r\n x: 0,\r\n y: 0\r\n },\r\n type: 'linear',\r\n colors: ['#2B781E', '#195010']\r\n },\r\n height: 32\r\n };\r\n }\r\n if (group === PURPLE) {\r\n headerContainerOpts = {\r\n backgroundGradient: {\r\n endPoint: {\r\n x: 0,\r\n y: '100%'\r\n },\r\n startPoint: {\r\n x: 0,\r\n y: 0\r\n },\r\n type: 'linear',\r\n colors: ['#873DA6', '#612A7D']\r\n },\r\n height: 32\r\n };\r\n }\r\n\r\n var container = Ti.UI.createView(headerContainerOpts);\r\n container.add(Ti.UI.createLabel(headerViewOpts));\r\n return Ti.UI.createTableViewSection({\r\n headerView: container,\r\n title: group\r\n });\r\n}\r\n\r\nwin.add(table);\r\nwin.open();\r\n{code}\r\n2. Build for android device.\r\n3. After the app launches observe the header text.\r\n\r\nh5.Actual results:\r\n1. All the following header text's are \"Purple\".\r\n\r\nh5.Expected results:\r\n1. The headers should Red ,Green,Purple, Purple,Red ,Green,Purple, Purple,Red ,Green,Purple, Purple.", "attachment": [], "flagged": false, "summary": "Android: TableViewSection header displays the first header text for all other headers", "creator": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Studio Ver: 6.0.0.202005141803\r\nSDK Ver: 10.0.0.v20210503094445\r\nOS Ver: 10.15.5\r\nXcode Ver: Xcode 12.4\r\nAppc NPM: 6.0.0-1\r\nAppc CLI: 9.0.0-10\r\nDaemon Ver: 4.0.4\r\nTi CLI Ver: 5.3.1\r\nAlloy Ver: 1.16.0\r\nNode Ver: 14.16.1\r\nNPM Ver: 6.14.12\r\nJava Ver: 11.0.6\r\nAndroid Devices: ⇨ google Pixel (Android 10)", "comment": { "comments": [ { "id": "458649", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~gmathews], the unusual thing in the above code is that same {{TableViewRow}} instance is being added multiple times to the {{TableView}} under different sections. That's likely the root cause. Probably a cloning issue.\r\n\r\nI doubt this issue would happen if every section had its own row instances like how it's normally set up.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-05-05T22:02:19.000+0000", "updated": "2021-05-05T22:02:19.000+0000" }, { "id": "458651", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/12778", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-05-06T17:39:55.000+0000", "updated": "2021-05-06T17:39:55.000+0000" }, { "id": "458661", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "merged to master and 10_0_X branches", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2021-05-07T18:42:20.000+0000", "updated": "2021-05-07T18:42:20.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }