{ "id": "113486", "key": "TIMOB-13698", "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": "15564", "description": "2013 Sprint 15 API", "name": "2013 Sprint 15 API", "archived": true, "released": true, "releaseDate": "2013-07-29" }, { "id": "15567", "description": "2013 Sprint 15", "name": "2013 Sprint 15", "archived": true, "released": true, "releaseDate": "2013-07-29" } ], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2013-07-25T22:24:49.000+0000", "created": "2013-04-29T09:33:54.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "supportTeam" ], "versions": [ { "id": "14164", "description": "Release 3.0.2", "name": "Release 3.0.2", "archived": true, "released": true, "releaseDate": "2013-02-19" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [ { "id": "34248", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "119976", "key": "AC-1955", "fields": { "summary": "Swipe (horizontal) doesn't work on a ScrollView", "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" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-29T17:49:18.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. Description\r\nAdding a 'swipe' event on a window that has a scrollView attached to it, the scrollView does not retract to the original position when pulling the scroll beyond the end. On pulling the scroll beyond the end you will see the blue highlighted part doesnt go back or bounce back as it should. Comment out the swipe event handler to see what is supposed to look like in the below provided code.\r\n\r\nh2. Test Code\r\n{code}\r\nvar w = Ti.UI.createWindow({\r\n backgroundColor : '#cecece',\r\n title : 'added by click from label1'\r\n });\r\n\r\n w.addEventListener('swipe', function(e){\r\n\r\n });\r\n\r\n var container = Ti.UI.createView({\r\n width : Ti.UI.FILL, height : Ti.UI.FILL, right : 0, left : 0\r\n })\r\n w.add(container)\r\n\r\n var scroll = Ti.UI.createScrollView({\r\n top : 0,\r\n backgroundColor : '#E9E9E9'\r\n })\r\n container.add(scroll);\r\n\r\n var inner = Ti.UI.createView({\r\n borderRadius : 0,\r\n top : 0,\r\n layout : 'vertical',\r\n height : Ti.UI.SIZE,\r\n width : Ti.UI.FILL,\r\n bottom : 5\r\n});\r\nscroll.add(inner);\r\n\r\nfor(var i = 0; i < 100; i++){\r\n inner.add(Titanium.UI.createLabel({ color:'#999', text:'I am Window 2 label ' + i, font:{fontSize:20,fontFamily:'Helvetica Neue'}, textAlign:'center', width:'auto' }));\r\n}\r\n w.open();\r\n{code}\r\n\r\nNote: On commenting the swipe event listener it work fine. ", "attachment": [ { "id": "39577", "filename": "WP_20130607_001.mp4", "author": { "name": "rsharma", "key": "rsharma", "displayName": "Rupesh Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-07T10:32:37.000+0000", "size": 6471404, "mimeType": "video/mp4" } ], "flagged": false, "summary": "Android: Adding a 'swipe' event on a window that has a scrollView attached to it, the scrollView does not bounce back or highlighted blue part remains when pulling the scroll beyond the end", "creator": { "name": "rsharma", "key": "rsharma", "displayName": "Rupesh Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "rsharma", "key": "rsharma", "displayName": "Rupesh Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Samsung Duos : 2.3.6", "comment": { "comments": [ { "id": "254812", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The issue cannot reproduce with master 3.2.0\r\n\r\nTested on:\r\nTitanium Studio, build: 3.0.1.201212181159\r\nTitanium SDK version: 3.2.0 \r\nDevice: Samsung galaxy s duos Android version: 4.0.4", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-30T05:53:10.000+0000", "updated": "2013-05-30T05:53:10.000+0000" }, { "id": "263095", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "When you have 'swipe' event in a scrollable view, the gesture event will be eaten when 'swipe' is fired, which causes the view to stop scrolling (in this case visual glitches - which is dependent on phone implementation). A simple workaround would be to utilize 'touchstart' and 'touchend' events to determine a swipe manually. For instance, this snippet would work for horizontal swipe:\r\n\r\n{code}\r\nvar startX = -1;\r\n w.addEventListener('touchstart', function(e) {\r\n startX = e.x;\r\n });\r\n w.addEventListener('touchend', function(e) {\r\n //if difference exceeds threshold (in this case 30 pixels), it's a swipe.\r\n if (startX > 0 && e.x - startX > 30) {\r\n Ti.API.info(\"horizontal swipe!\");\r\n }\r\n startX = -1;\r\n });\r\n{code}", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-25T01:09:07.000+0000", "updated": "2013-07-26T22:49:37.000+0000" }, { "id": "263264", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "My understanding is that this is a non-native Android behavior, so we do not wish to add it to the core SDK. However, for those interested in implementing the functionality regardless, please see the workaround provided by [~hpham]", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-25T22:24:49.000+0000", "updated": "2013-07-25T22:24:49.000+0000" }, { "id": "263391", "author": { "name": "mobile_developer@onforce.com", "key": "mobile_developer@onforce.com", "displayName": "Guto Dasilva", "active": true, "timeZone": "America/New_York" }, "body": "The android version tested is not the same that this problem manifests. The android version that this happens is 2.3.6. I was on a call with you guys via skype to help reproduce the problem and we were able to reproduced and titanium team i was working with understood the problem.", "updateAuthor": { "name": "mobile_developer@onforce.com", "key": "mobile_developer@onforce.com", "displayName": "Guto Dasilva", "active": true, "timeZone": "America/New_York" }, "created": "2013-07-26T13:10:44.000+0000", "updated": "2013-07-26T13:10:44.000+0000" }, { "id": "263392", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~mobile_developer@onforce.com] I realize now that [~hpham]'s workaround was hidden to normal users. You should be able to view it now.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-26T13:15:30.000+0000", "updated": "2013-07-26T13:15:30.000+0000" }, { "id": "263394", "author": { "name": "mobile_developer@onforce.com", "key": "mobile_developer@onforce.com", "displayName": "Guto Dasilva", "active": true, "timeZone": "America/New_York" }, "body": "[~ingo] I still cant see it.", "updateAuthor": { "name": "mobile_developer@onforce.com", "key": "mobile_developer@onforce.com", "displayName": "Guto Dasilva", "active": true, "timeZone": "America/New_York" }, "created": "2013-07-26T13:19:22.000+0000", "updated": "2013-07-26T13:19:22.000+0000" }, { "id": "263395", "author": { "name": "mobile_developer@onforce.com", "key": "mobile_developer@onforce.com", "displayName": "Guto Dasilva", "active": true, "timeZone": "America/New_York" }, "body": "[~ingo] my workaround is not to add the swipe event on models 2.3.6 which is not ideal since we have an action menu style that swipes to the side. So I am curious what [~hpham] workaround is.\r\nThanks", "updateAuthor": { "name": "mobile_developer@onforce.com", "key": "mobile_developer@onforce.com", "displayName": "Guto Dasilva", "active": true, "timeZone": "America/New_York" }, "created": "2013-07-26T13:29:34.000+0000", "updated": "2013-07-26T13:29:34.000+0000" }, { "id": "263520", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "You should be able to see the workaround now - basically manipulating 'touchstart' and 'touchend' events.", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-26T22:50:37.000+0000", "updated": "2013-07-26T22:50:37.000+0000" }, { "id": "263622", "author": { "name": "mobile_developer@onforce.com", "key": "mobile_developer@onforce.com", "displayName": "Guto Dasilva", "active": true, "timeZone": "America/New_York" }, "body": "ok [~hpham] will try that.\r\nThanks", "updateAuthor": { "name": "mobile_developer@onforce.com", "key": "mobile_developer@onforce.com", "displayName": "Guto Dasilva", "active": true, "timeZone": "America/New_York" }, "created": "2013-07-29T13:27:36.000+0000", "updated": "2013-07-29T13:27:36.000+0000" }, { "id": "416212", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket with reference to the above comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-29T17:49:18.000+0000", "updated": "2017-03-29T17:49:18.000+0000" } ], "maxResults": 15, "total": 15, "startAt": 0 } } }