{ "id": "121350", "key": "TIMOB-15520", "fields": { "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true }, "parent": { "id": "120880", "key": "TIMOB-15408", "fields": { "summary": "Android: TableView/ListView behaves incorrectly when ScrollableView inside TableView/ListView", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "Low", "id": "4" }, "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": [], "resolution": null, "resolutiondate": null, "created": "2013-10-17T21:30:36.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [ { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:03:44.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "1. Run the test case for tableview without {code}className: \"scrollable\"{code}. Scroll the first row to the green view. Scroll the tableview down to the bottom and then up to the top. Scroll the first row to other color again. The app crashes with the error \"E/AndroidRuntime( 4744): java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.\"\r\n2. Run the test case for tableview with/without {code}className: \"scrollable\"{code}. Scroll the first row to the green view and then scroll the tableview up and down several times. The first row does not stay at the green view. Probably because the item views in the TableView get recycled when they are off screen.\r\n{code}\r\n--------------------- Test case for TableView ----------------------------\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor : 'white',\r\n modal : false\r\n});\r\n \r\nvar table = Ti.UI.createTableView();\r\nvar rowData = [];\r\n \r\nfor (var i = 0; i < 10; i++) {\r\n var scrollable = Ti.UI.createScrollableView({\r\n top : 0,\r\n left : 0,\r\n bottom : 0,\r\n right : 0,\r\n backgroundColor : 'orange',\r\n views : [Ti.UI.createView({\r\n backgroundColor : 'blue'\r\n }), Ti.UI.createView({\r\n backgroundColor : 'green'\r\n }), Ti.UI.createView({\r\n backgroundColor : 'yellow'\r\n })]\r\n });\r\n \r\n var row = Ti.UI.createTableViewRow({\r\n //className: \"scrollable\"\r\n height : 300\r\n });\r\n row.add(scrollable);\r\n rowData.push(row);\r\n}\r\n \r\nfor (var i = 0; i < 40; i++) {\r\n rowData.push(Ti.UI.createTableViewRow({\r\n title : (\"test2 \" + i)\r\n }));\r\n}\r\ntable.data = rowData;\r\n \r\nwin.add(table);\r\nwin.open(); \r\n{code}", "attachment": [], "flagged": false, "summary": "Android: ScrollableView doesn't work properly in TableView", "creator": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [], "maxResults": 0, "total": 0, "startAt": 0 } } }