{ "id": "64108", "key": "TIMOB-3476", "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": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-09-11T03:27:42.000+0000", "created": "2011-04-15T03:45:41.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "module_scrollableview", "qe-review", "qe-testadded" ], "versions": [ { "id": "11233", "name": "Release 1.6.0", "archived": true, "released": true, "releaseDate": "2011-02-23" } ], "issuelinks": [ { "id": "14619", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "85110", "key": "TIDOC-265", "fields": { "summary": "APIDoc: improve scrollableView documentation", "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": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-09-11T03:27:42.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": "h2. Problem\r\n\r\nNone of the events listed in [Titanium.UI.ScrollableView|http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.ScrollableView-object] fire, with the exception of the {{scroll}} event.\r\n\r\nThis ticket has been raised to acknowledge the behavior. Note that there is an opinion that this behavior is desired, as some events can be easily confused with scroll when user gestures are performed. Possibly scrollableView should only have one or two events (scroll and click). When other events are needed, additional views can be added. See the workaround below for an example.\r\n\r\nTo resolve this ticket, either the behavior should be modified, or the API docs corrected.\r\n\r\nh2. Test case\r\n\r\nResults for both android and ios are inline.\r\n\r\n{code:lang=javascript|title=app.js}\r\nvar win = Ti.UI.createWindow();\r\n \r\nvar view1 = Ti.UI.createView({backgroundColor:'red', touchEnabled:false});\r\nvar view2 = Ti.UI.createView({backgroundColor:'blue', touchEnabled:false});\r\nvar view3 = Ti.UI.createView({backgroundColor:'green', touchEnabled:false});\r\nvar scrollableView = Ti.UI.createScrollableView({\r\n views:[view1,view2,view3]\r\n});\r\nwin.add(scrollableView);\r\n\r\n\r\nscrollableView.addEventListener('click', function() {\r\n Ti.API.info('Click event heard');\r\n});\r\n\r\n// ios\r\nscrollableView.addEventListener('dblclick', function() {\r\n Ti.API.info('dblclick event heard');\r\n});\r\n\r\n// ios\r\nscrollableView.addEventListener('doubletap', function() {\r\n Ti.API.info('doubletap event heard');\r\n});\r\n\r\n\r\nscrollableView.addEventListener('longclick', function() {\r\n Ti.API.info('longclick event heard');\r\n});\r\n\r\n// ios\r\nscrollableView.addEventListener('longpress', function() {\r\n Ti.API.info('longpress event heard');\r\n});\r\n\r\nscrollableView.addEventListener('pinch', function() {\r\n Ti.API.info('pinch event heard');\r\n});\r\n\r\n// ios\r\nscrollableView.addEventListener('singletap', function() {\r\n Ti.API.info('singletap event heard');\r\n});\r\n\r\n// ios\r\n// android\r\nscrollableView.addEventListener('scroll', function() {\r\n Ti.API.info('scroll event heard');\r\n});\r\n\r\n\r\nscrollableView.addEventListener('scrollEnd', function() {\r\n Ti.API.info('scrollEnd event heard');\r\n});\r\n\r\n\r\nscrollableView.addEventListener('swipe', function() {\r\n Ti.API.info('swipe event heard');\r\n});\r\n\r\n\r\nscrollableView.addEventListener('touchcancel', function() {\r\n Ti.API.info('touchcancel event heard');\r\n});\r\n\r\nscrollableView.addEventListener('touchend', function() {\r\n Ti.API.info('touchend event heard');\r\n});\r\n\r\nscrollableView.addEventListener('touchmove', function() {\r\n Ti.API.info('touchmove event heard');\r\n});\r\n\r\n// ios\r\nscrollableView.addEventListener('touchstart', function() {\r\n Ti.API.info('touchstart event heard');\r\n});\r\n\r\n// ios\r\nscrollableView.addEventListener('twofingertap', function() {\r\n Ti.API.info('twofingertap event heard');\r\n});\r\n\r\nwin.open();\r\n{code}\r\n\r\nSo the only caveat to the above workaround is that views have a maximum descendant limit of 12, so already (with the\r\nscrollableView, it's child view, and this extra view), 3 views have already been consumed out of this limit. This should not be a problem however, except in some very rare cases, but it's worthwhile keeping it in mind.", "attachment": [], "flagged": false, "summary": "Android: UI.ScrollableView - only scroll event fires. No others work (possibly desired behavior)", "creator": { "name": "hal", "key": "hal", "displayName": "hal", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "environment": "* Android emulator, 2.2\r\n* Ti SDK 1.6.1", "comment": { "comments": [ { "id": "195078", "author": { "name": "vjoshi", "key": "vjoshi", "displayName": "Varun Joshi", "active": true, "timeZone": "America/New_York" }, "body": "The issue is resolved in Release 2.0", "updateAuthor": { "name": "vjoshi", "key": "vjoshi", "displayName": "Varun Joshi", "active": true, "timeZone": "America/New_York" }, "created": "2012-05-16T15:08:44.000+0000", "updated": "2012-05-16T15:08:44.000+0000" }, { "id": "216971", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "With reference to updated API docs, verified that only scroll event fired for scrollableview on Android.\r\nVerified on:\r\nTitanium Studio: 2.1.2.201208281351\r\nTitanium SDK: 2.2.0.v20120828153312\r\nAndroid Emulator v2.2, Samsung Galaxy Note (v2.3)", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-30T05:30:59.000+0000", "updated": "2012-08-30T05:30:59.000+0000" }, { "id": "218343", "author": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Re-opening to edit label", "updateAuthor": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-11T03:27:00.000+0000", "updated": "2012-09-11T03:27:00.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }