{ "id": "176057", "key": "TIMOB-28399", "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-03-29T21:40:33.000+0000", "created": "2021-02-17T06:39:25.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2021-03-29T21:40:33.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": "It appears that the rewrite of TableView to use RecyclerView has left a few loose ends. We were shocked to see code that had run for years and years broken. The problem is that the new TableView (and probably ListView) implementations don't handle TableViewRows with child views properly. In particular, say you start by creating TableViewRows which are composed of multiple child views like images and labels and push those TableViewRows into an array. Then you create a TableView and then TableView.setData(TableViewRows). Everything is fine.\r\n\r\nThen later you use TableView.setData(TableViewRows) to set new information into the rows. When you do that, [theory] the attributes of the child views of the TableViewRows are zeroed [/theory] so it looks as though the child views have disappeared when the TableView is shown after the setData. But the bottom line is that the child views of the TableViewRow disappear after the setData with SDK 9.3 and above, and the child views continue to be displayed after the setData with SDK 9.2.2 and prior.\r\n\r\nBEFORE:\r\n{code:java}\r\n\"children\":[],\"size\":{\"height\":20,\"width\":34,\"y\":0,\"x\":0},\"rect\":{\"absoluteX\":0,\"height\":20,\"width\":34,\"y\":0,\"absoluteY\":80,\"x\":0}\r\n{code}\r\nAFTER:\r\n{code:java}\r\n\"children\":[],\"size\":{\"height\":0,\"width\":0,\"y\":0,\"x\":0},\"rect\":{\"absoluteX\":0,\"height\":0,\"width\":0,\"y\":0,\"absoluteY\":0,\"x\":0}\r\n{code}\r\n\r\nI've attached a test program where it creates a TableView with several composite rows with a colored label and image. Then if you click on any row, the TableView has setData applied with the same TableViewRow data array and (voila) the label and image disappear replaced by the title field - they are still children, but they have zero dimensions. Sounds crazy but it is really happening. I won't speculate as to whether this is a deep copy vs shallow copy bug or some other mischief but this really disrupted our release schedule. ", "attachment": [ { "id": "67793", "filename": "tvtest.zip", "author": { "name": "jfalcone", "key": "jfalcone", "displayName": "Joe Falcone", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-02-17T06:28:09.000+0000", "size": 8657535, "mimeType": "application/zip" }, { "id": "67794", "filename": "tvtest 2.zip", "author": { "name": "jfalcone", "key": "jfalcone", "displayName": "Joe Falcone", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-02-17T20:05:21.000+0000", "size": 8657647, "mimeType": "application/zip" } ], "flagged": false, "summary": "Android: TableView setData does not preserve TableViewRow child views", "creator": { "name": "jfalcone", "key": "jfalcone", "displayName": "Joe Falcone", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jfalcone", "key": "jfalcone", "displayName": "Joe Falcone", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "SDK 9.3 and above. Tested on Mac Catalina on a Samsung Galaxy G920A", "comment": { "comments": [ { "id": "458257", "author": { "name": "jfalcone", "key": "jfalcone", "displayName": "Joe Falcone", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I've modified the test program to use forEach to print out the contents of the tableData array (and I shortened the array to 2 rows). Initially, the tableData row children have reasonable rendered values and then after either the first or second setData(tableData), they disappear. I'm not sure whether this is just a rendering time artifact or evidence of a problem. The bottom line is that the child objects are no longer rendered after the setData is repeated which is not the behavior we see with SDK 9.2.2 and prior.", "updateAuthor": { "name": "jfalcone", "key": "jfalcone", "displayName": "Joe Falcone", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-02-17T20:04:00.000+0000", "updated": "2021-02-17T20:04:00.000+0000" }, { "id": "458454", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/12620", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-03-18T18:02:38.000+0000", "updated": "2021-03-18T18:02:38.000+0000" }, { "id": "458467", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "merged to master and 10_0_X for 10.0.0 target.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2021-03-23T16:56:12.000+0000", "updated": "2021-03-23T16:56:12.000+0000" }, { "id": "458484", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-03-25T19:20:37.000+0000", "updated": "2021-03-25T19:20:37.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }