{ "id": "121276", "key": "AC-2089", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2013-10-16T16:49:27.000+0000", "created": "2013-10-16T16:41:39.000+0000", "labels": [ "android" ], "versions": [], "issuelinks": [], "assignee": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updated": "2016-03-08T07:41:03.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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "Adding a swipe event listener to a window containing a scrollview causes the scrollview to stop scrolling properly on Android.\r\n\r\nadded one line to the kitchensink scroll_views_basic.js to reproduce.\r\n\r\n{code:title=scroll_views_basic.js|borderStyle=solid}\r\nfunction scroll_view_basic(_args) {\r\n\tvar win = Titanium.UI.createWindow({\r\n\t\ttitle:_args.title\r\n\t});\r\n\t\r\n\twin.addEventListener('swipe', function(e){});\r\n\t\r\n\tvar scrollView = Titanium.UI.createScrollView({\r\n\t\tcontentWidth:'auto',\r\n\t\tcontentHeight:'auto',\r\n\t\ttop:0,\r\n\t\tshowVerticalScrollIndicator:true,\r\n\t\tshowHorizontalScrollIndicator:true\r\n\t});\r\n\t\r\n\t\r\n\tvar view = Ti.UI.createView({\r\n\t\tbackgroundColor:'#336699',\r\n\t\tborderRadius:10,\r\n\t\twidth:300,\r\n\t\theight:2000,\r\n\t\ttop:10\r\n\t});\r\n\t\r\n\tscrollView.add(view);\r\n\t\r\n\tvar button = Titanium.UI.createButton({\r\n\t\ttitle:'Scroll to Top',\r\n\t\theight:40,\r\n\t\twidth:200,\r\n\t\tbottom:10\r\n\t});\r\n\tview.add(button);\r\n\tbutton.addEventListener('click', function()\r\n\t{\r\n\t\tscrollView.scrollTo(0,0);\r\n\t});\r\n\t\r\n\tvar button2 = Titanium.UI.createButton({\r\n\t\ttitle:'Add to Scroll View',\r\n\t\theight:40,\r\n\t\twidth:200,\r\n\t\ttop:20\r\n\t});\r\n\tscrollView.add(button2);\r\n\tbutton2.addEventListener('click', function()\r\n\t{\r\n\t\tvar view = Ti.UI.createView({\r\n\t\t\tbackgroundColor:'red',\r\n\t\t\tborderRadius:10,\r\n\t\t\twidth:300,\r\n\t\t\theight:300,\r\n\t\t\ttop:2020\r\n\t\t});\r\n\t\tscrollView.add(view);\r\n\t\r\n\t});\r\n\t\r\n\twin.add(scrollView);\r\n\t\r\n\treturn win;\r\n};\r\n\r\nmodule.exports = scroll_view_basic;\r\n{code} ", "attachment": [], "flagged": false, "summary": "Android scrollview unusable with swipe", "creator": { "name": "jliddell", "key": "jliddell", "displayName": "John Liddell", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "jliddell", "key": "jliddell", "displayName": "John Liddell", "active": true, "timeZone": "America/Chicago" }, "environment": "Android", "comment": { "comments": [ { "id": "275289", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello,\r\n\r\nwe don't recommend have multiple scrollable controls in the same view. It doesn't work because the swipe is being transferred to the parent view. Is there any way you can redesign your UI?\r\n\r\nBest,\r\n\r\nMauro ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2013-10-16T16:49:27.000+0000", "updated": "2013-10-16T16:49:27.000+0000" }, { "id": "275293", "author": { "name": "jliddell", "key": "jliddell", "displayName": "John Liddell", "active": true, "timeZone": "America/Chicago" }, "body": "there is only one scrollable control existing in this window, this is the TI example on scroll views from kitchen sink...", "updateAuthor": { "name": "jliddell", "key": "jliddell", "displayName": "John Liddell", "active": true, "timeZone": "America/Chicago" }, "created": "2013-10-16T17:00:15.000+0000", "updated": "2013-10-16T17:00:15.000+0000" }, { "id": "275296", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello John,\nthe scrolling of the scrollableview is being transfered to the window as well, that's the reason is acting weird. \n\nBest,\n\nMauro ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2013-10-16T17:07:57.000+0000", "updated": "2013-10-16T17:07:57.000+0000" }, { "id": "275300", "author": { "name": "jliddell", "key": "jliddell", "displayName": "John Liddell", "active": true, "timeZone": "America/Chicago" }, "body": "the scrolling works perfectly fine if you remove the line adding a swipe event listener. can be reproduced in a single windowed single scrollview project as well.", "updateAuthor": { "name": "jliddell", "key": "jliddell", "displayName": "John Liddell", "active": true, "timeZone": "America/Chicago" }, "created": "2013-10-16T17:23:23.000+0000", "updated": "2013-10-16T17:23:23.000+0000" }, { "id": "275320", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello John,\nyes, it works just fine because you are not adding several views/windows with different scrolling. \n\ni.e., the unusable part is because you can't put two different scrolling elements on top of the other. \n\nBest,\n\nMauro ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2013-10-16T18:41:52.000+0000", "updated": "2013-10-16T18:41:52.000+0000" }, { "id": "275323", "author": { "name": "jliddell", "key": "jliddell", "displayName": "John Liddell", "active": true, "timeZone": "America/Chicago" }, "body": "It in fact does not work event with a single scroll view.", "updateAuthor": { "name": "jliddell", "key": "jliddell", "displayName": "John Liddell", "active": true, "timeZone": "America/Chicago" }, "created": "2013-10-16T18:50:59.000+0000", "updated": "2013-10-16T18:50:59.000+0000" }, { "id": "275326", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello,\n\nyou said that it works if you don't add the event in the window, right? Does the scrollview works?\n\nBest,\nMauro ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2013-10-16T18:53:52.000+0000", "updated": "2013-10-16T18:53:52.000+0000" }, { "id": "275329", "author": { "name": "jliddell", "key": "jliddell", "displayName": "John Liddell", "active": true, "timeZone": "America/Chicago" }, "body": "if i create a single window and a single scrollview, then addEventListener('swipe', function(x){}); to either the window or the scrollview, the scrollview will no longer scroll properly. i am not trying to do multiple scrolling items on one view.", "updateAuthor": { "name": "jliddell", "key": "jliddell", "displayName": "John Liddell", "active": true, "timeZone": "America/Chicago" }, "created": "2013-10-16T18:56:36.000+0000", "updated": "2013-10-16T18:56:36.000+0000" }, { "id": "275330", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello John,\n\nyou can't add a swipe event to scrollableview. It already has a similar event, therefore if you add \ntwo, it will work funky or not work at all. \n\nIf you add a swipe to the window, the actions in the scrollview will be transmitted to the parent (i.e., the window) and will act funky with the scrollable view. \n\nBest,\n\nMauro ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2013-10-16T18:59:00.000+0000", "updated": "2013-10-16T18:59:00.000+0000" }, { "id": "275333", "author": { "name": "jliddell", "key": "jliddell", "displayName": "John Liddell", "active": true, "timeZone": "America/Chicago" }, "body": "my concern is not with scrollableview but with scrollview ", "updateAuthor": { "name": "jliddell", "key": "jliddell", "displayName": "John Liddell", "active": true, "timeZone": "America/Chicago" }, "created": "2013-10-16T19:02:38.000+0000", "updated": "2013-10-16T19:02:38.000+0000" }, { "id": "280987", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Invalid issue. ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2013-11-24T22:18:32.000+0000", "updated": "2013-11-24T22:18:32.000+0000" } ], "maxResults": 11, "total": 11, "startAt": 0 } } }