{ "id": "136772", "key": "TIMOB-17954", "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": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-03-09T19:05:20.000+0000", "created": "2014-09-18T08:19:28.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "TCSupport", "android", "scrollview" ], "versions": [ { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" }, { "id": "15972", "description": "Release 3.4.0", "name": "Release 3.4.0", "archived": false, "released": true, "releaseDate": "2014-09-28" } ], "issuelinks": [ { "id": "54529", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "165126", "key": "TIMOB-24260", "fields": { "summary": "Android: ScrollView.scrollTo not behave like iOS (Parity)", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "53853", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "165126", "key": "TIMOB-24260", "fields": { "summary": "Android: ScrollView.scrollTo not behave like iOS (Parity)", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "fmerzadyan", "key": "fmerzadyan2", "displayName": "Frankie Merzadyan", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-24T21:35:09.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": "h4. Problem Description\r\nScrollTo function takes two coordinate parameters. When the default unit configured for the project is dp, the function still takes the parameters as system units instead causing a behavior disparity between iOS and Android.\r\n\r\n\r\nh4. Steps to reproduce\r\n1. Create a new mobile project (classic titanium)\r\n2. Paste this code into app.js:\r\n{code} \r\nvar win = Titanium.UI.createWindow({ \r\n backgroundColor:'#fff',\r\n layout:'vertical'\r\n});\r\n\r\nvar btn = Ti.UI.createButton({\r\n\ttitle : 'Scroll',\r\n\theight : 'auto',\r\n\twidth : 'auto',\r\n\ttop : 20,\r\n\tcolor:'#000'\r\n});\r\n\r\nbtn.addEventListener('click', function() {\r\n\tscrollView.scrollTo(0,500);\r\n});\r\n\r\nvar scrollView = Ti.UI.createScrollView({\r\n\t\tcontentWidth : 'auto',\r\n\t\tcontentHeight : 'auto',\r\n\t\tlayout : \"vertical\",\r\n\t\tshowVerticalScrollIndicator : false,\r\n\t\tshowHorizontalScrollIndicator : true,\r\n\t\theight : '100%',\r\n\t\twidth : '100%',\r\n\t\tscrollType : 'vertical',\r\n\t\thorizontalWrap : false,\r\n\t\tbackgroundColor:'white',\r\n\t\ttop:10\r\n});\r\n\r\nvar view1 = Ti.UI.createView({\r\n\t\theight : '200',\r\n\t\tbackgroundColor:'red'\r\n});\r\nvar view2 = Ti.UI.createView({\r\n\t\theight : '200',\r\n\t\tbackgroundColor:'green'\r\n});\r\nvar view3 = Ti.UI.createView({\r\n\t\theight : '200',\r\n\t\tbackgroundColor:'blue'\r\n});\r\nvar view4 = Ti.UI.createView({\r\n\t\theight : '200',\r\n\t\tbackgroundColor:'yellow'\r\n});\r\nwin.add(btn);\r\nwin.add(scrollView);\r\nscrollView.add(view1);\r\nscrollView.add(view2);\r\nscrollView.add(view3);\r\nscrollView.add(view4);\r\nwin.open();\r\n{code}\r\n\r\nh4. Extra info\r\nThis code scrolls to the middle of the third view on iOS. On Android the scroll location depends on the density of the device used.", "attachment": [], "flagged": false, "summary": "Android: ScrollView's ScrollTo(x,y) incorrect behavior (Parity)", "creator": { "name": "hini", "key": "hini", "displayName": "Hani Hamadeh", "active": true, "timeZone": "Asia/Beirut" }, "subtasks": [], "reporter": { "name": "hini", "key": "hini", "displayName": "Hani Hamadeh", "active": true, "timeZone": "Asia/Beirut" }, "environment": "Titanium 3.3\r\nTi SDK 3.3.0.GA and 3.4.0 \r\nTi CLI 3.4.0 \r\nMac OS X 10.9.5 \r\nAndroid 4.4.3 \r\niOS 7.1.2 \r\nAlloy 1.5.0-beta2", "comment": { "comments": [ { "id": "383277", "author": { "name": "amurcia", "key": "amurcia", "displayName": "Anna", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I'm having the same issue on Ti SDK 5.1.2.GA", "updateAuthor": { "name": "amurcia", "key": "amurcia", "displayName": "Anna", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-04-20T07:54:36.000+0000", "updated": "2016-04-20T07:54:36.000+0000" }, { "id": "383530", "author": { "name": "amurcia", "key": "amurcia", "displayName": "Anna", "active": true, "timeZone": "America/Los_Angeles" }, "body": "What units need scrollT(x,y) ??? dp or px?? on Android", "updateAuthor": { "name": "amurcia", "key": "amurcia", "displayName": "Anna", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-04-21T12:15:10.000+0000", "updated": "2016-04-21T12:15:10.000+0000" }, { "id": "383531", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Looking at the [source|https://github.com/appcelerator/titanium_mobile/blob/415bd6c66dcc55b1a59a59574f3babd3c3a84ede/android/modules/ui/src/java/ti/modules/titanium/ui/ScrollViewProxy.java#L121] I'd say px on Android. We should document (and improve that to accept default unit) that.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2016-04-21T12:27:12.000+0000", "updated": "2016-04-21T12:27:12.000+0000" }, { "id": "383532", "author": { "name": "amurcia", "key": "amurcia", "displayName": "Anna", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Yes, I'm having a lot of problems with that. this is crazy!", "updateAuthor": { "name": "amurcia", "key": "amurcia", "displayName": "Anna", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-04-21T13:23:43.000+0000", "updated": "2016-04-21T13:23:43.000+0000" }, { "id": "403865", "author": { "name": "aislam", "key": "aislam", "displayName": "Aminul Islam", "active": false, "timeZone": "Etc/GMT-6" }, "body": "Hi,\r\nI have tested this issue with latest environment. Still this is a valid issue for android.\r\nTest Environment :\r\n{code}\r\nOperating System\r\n Name = Mac OS X\r\n Version = 10.11.6\r\n Architecture = 64bit\r\n # CPUs = 4\r\n Memory = 8589934592\r\nNode.js\r\n Node.js Version = 4.4.4\r\n npm Version = 2.15.1\r\nTitanium CLI\r\n CLI Version = 5.0.11\r\nTitanium SDK\r\n SDK Version = 6.0.1.GA\r\n{code}\r\nThanks", "updateAuthor": { "name": "aislam", "key": "aislam", "displayName": "Aminul Islam", "active": false, "timeZone": "Etc/GMT-6" }, "created": "2016-12-26T14:04:27.000+0000", "updated": "2016-12-26T14:04:27.000+0000" }, { "id": "404415", "author": { "name": "fmerzadyan", "key": "fmerzadyan2", "displayName": "Frankie Merzadyan", "active": false, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/8743. The parity is still a bit off. I suggest a better way to scroll would be to scroll to actual UI components instead if you want precision and better consistency for behavior.", "updateAuthor": { "name": "fmerzadyan", "key": "fmerzadyan2", "displayName": "Frankie Merzadyan", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-01-11T00:37:26.000+0000", "updated": "2017-01-11T00:37:26.000+0000" }, { "id": "415794", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed in 6.1.0.v20170313171259. Test and other information can be found at: https://github.com/appcelerator/titanium_mobile/pull/8743", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-24T21:34:37.000+0000", "updated": "2017-03-24T21:34:37.000+0000" } ], "maxResults": 11, "total": 11, "startAt": 0 } } }