{ "id": "64010", "key": "TIMOB-3378", "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": "12083", "description": "", "name": "Sprint 2011-43", "archived": true, "released": true, "releaseDate": "2011-10-31" }, { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-01-03T18:04:40.000+0000", "created": "2011-04-15T03:43:31.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "module_scrollview", "qe-testadded" ], "versions": [ { "id": "11260", "description": "", "name": "Release 1.6.2", "archived": true, "released": true, "releaseDate": "2011-04-20" } ], "issuelinks": [], "assignee": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-11-19T06:14:22.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": "{html}
It seems to me that the remove() method on ScrollView doesn't do\r\nits job on Android (build 1.6.0+ from continous builds). Here is a\r\ntest code where a button should be removed from the view when it's\r\nclicked:
\r\n\r\nvar win = Titanium.UI.createWindow({ \r\n title:'Scrollview test window',\r\n backgroundColor:'#fff'\r\n});\r\n\r\nvar scrollview = Ti.UI.createScrollView({layout: 'vertical'});\r\n\r\nwin.add(scrollview);\r\n\r\nfunction onButtonClick(event){\r\n var button = event.source;\r\n var n = Ti.UI.createNotification({message: 'Removed button \"' + button.title + '\"'});\r\n n.duration = Ti.UI.NOTIFICATION_DURATION_LONG;\r\n button.removeEventListener('click', onButtonClick);\r\n scrollview.remove(button);\r\n n.show();\r\n}\r\n\r\nvar i, button;\r\nfor (i = 0; i < 30; i++) {\r\n button = Ti.UI.createButton({title: String.format('Click to remove #%d', i)});\r\n button.addEventListener('click', onButtonClick);\r\n scrollview.add(button);\r\n}\r\n\r\nwin.open();
\r\n
\r\nI've attached a test project containing this code for you to\r\nenjoy.