{ "id": "92217", "key": "TIMOB-9206", "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": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13403", "description": "Sprint 2012-11 Core", "name": "Sprint 2012-11 Core", "archived": true, "released": true, "releaseDate": "2012-06-03" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-06-01T13:10:14.000+0000", "created": "2012-05-23T11:18:02.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "core", "module_scrollview", "parity", "qe-testadded" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "issuelinks": [ { "id": "17593", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "inwardIssue": { "id": "92678", "key": "TIMOB-9341", "fields": { "summary": "Android: Support Scroll View canCancelEvents", "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": "High", "id": "2" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "57901", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "174342", "key": "TIMOB-27530", "fields": { "summary": "Android: UI glitches out when using 'applyProperties' with Scroll View Touch Listeners", "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": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2019-11-06T16:21:27.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": "h1. Problem\r\nAdding a touch listener to a scroll view on Android prevents the scroll view from being scrollable. Although the events do then fire, they fire with the scroll view always as the source. This is inconsistent with iOS.\r\n\r\nh2. Expected Behavior\r\nIt should behave as iOS does. The events should fire, and the scroll view should scroll. Further, the source should be the most deeply child touchable view, like on iOS.\r\n\r\nh2. Reproduction\r\nDrop the following in an app.js. It adds a vertically scrollable list of draggable rectangles. On iOS, you can drag them horizontally. On Android, you can't drag them anywhere, or even scroll the scroll view.\r\n{code:title=app.js}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#fff'\r\n});\r\nvar scroll = Ti.UI.createScrollView({\r\n scrollType: 'vertical',\r\n contentHeight: 3010,\r\n text: 'Scroll View'\r\n});\r\nvar width = 150, height = 90;\r\nfor (var i = 0; i < 30; i++) {\r\n scroll.add(Ti.UI.createLabel({\r\n draggable: true,\r\n text: 'Drag Me Horizontally ' + (i + 1), textAlign: 'center',\r\n color: '#000',\r\n top: i * 100 + 10,\r\n width: width, height: height,\r\n backgroundColor: '#eee'\r\n }));\r\n}\r\nscroll.addEventListener('touchstart', doDrag);\r\nscroll.addEventListener('touchmove', doDrag);\r\nscroll.addEventListener('touchcancel', doDrag);\r\nscroll.addEventListener('touchend', doDrag);\r\nfunction doDrag(evt) {\r\n Ti.API.info('Event Fired On: ' + evt.source.text);\r\n if (evt.source.draggable) {\r\n var global = evt.source.convertPointToView({ x: evt.x, y: evt.y }, scroll);\r\n evt.source.updateLayout({\r\n left: global.x - width / 2\r\n });\r\n }\r\n}\r\nwin.add(scroll);\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: Scroll View Touch Listeners Prevent Scrolling", "creator": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "environment": "Titanium SDK version: 2.1.0 (05/03/12 17:34 c366287)\r\nAndroid EPIC 4G running Android 2.3.7", "comment": { "comments": [ { "id": "196804", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR ready: https://github.com/appcelerator/titanium_mobile/pull/2300", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-31T17:21:06.000+0000", "updated": "2012-05-31T17:21:06.000+0000" }, { "id": "197390", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing bug. Verified fix on:\r\n\r\nSDK build: 2.1.0.v20120604151821\r\nTitanium Studio, build: 2.1.0.201206041625\r\nRuntime: v8\r\nDevice: Droid 1 (2.2.3)", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-06-05T14:29:33.000+0000", "updated": "2012-06-05T14:29:33.000+0000" }, { "id": "208725", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "ScrollViews will intercept touch events. The labels should be placed inside wrapperViews(SIZE width and height) with enabled:false and the touch event handlers must be added to the labels directly. The wrapperViews must be moved around.", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-07-20T13:52:28.000+0000", "updated": "2012-07-20T13:52:28.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }