{ "id": "168962", "key": "TIMOB-24963", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": "17609", "description": "", "name": "Release 7.0.0", "archived": false, "released": true, "releaseDate": "2017-12-07" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-11-16T00:48:31.000+0000", "created": "2017-07-14T18:15:47.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [], "issuelinks": [ { "id": "55427", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "inwardIssue": { "id": "168971", "key": "TIMOB-24964", "fields": { "summary": "Windows: Add scrollToTop() to 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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2017-11-16T01:54:17.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": "Currently ScrollView has a {{scrollToBottom()}} method but no {{scrollToTop()}}. While this can be achieved with {{scrollTo(0,0)}} the new {{scrollToTop()}} uses FOCUS_UP to scroll to the top position in order to solve nested problems (see: https://stackoverflow.com/a/44046801/5193915)\r\n\r\nExample:\r\n\r\n{code:js}\r\nvar win = Ti.UI.createWindow({backgroundColor: '#fff'});\r\nvar view1 = Ti.UI.createView({width:20,height:20,backgroundColor:\"#f00\",top:0});\r\nvar view2 = Ti.UI.createView({width:20,height:20,backgroundColor:\"#f0f\",top:800});\r\nvar scrollView = Ti.UI.createScrollView({height:Ti.UI.FILL,width:Ti.UI.FILL});\r\nvar btn1 = Ti.UI.createButton({title:\"scrollUp\",top: 10,left:0});\r\nvar btn2 = Ti.UI.createButton({title:\"scrollDown\",bottom:10,left:0});\r\n\r\nbtn1.addEventListener(\"click\",function(e){scrollView.scrollToTop()});\r\nbtn2.addEventListener(\"click\",function(e){scrollView.scrollToBottom()});\r\n\r\nwin.add(scrollView);\r\nwin.add(btn1);\r\nwin.add(btn2);\r\nscrollView.add(view1);\r\nscrollView.add(view2);\r\nwin.open();\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Android: Add scrollToTop() to ScrollView", "creator": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "comment": { "comments": [ { "id": "424156", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/9221", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-07-14T18:23:09.000+0000", "updated": "2017-07-14T18:23:09.000+0000" }, { "id": "424189", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~michael] We should think about parity here as well. I made a PR to your [PR-branch|https://github.com/m1ga/titanium_mobile/pull/2] to do so, if possible, we should think about Windows as well (cc [~kiguchi]).", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-07-16T02:18:27.000+0000", "updated": "2017-07-16T02:23:55.000+0000" }, { "id": "424192", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Created TIMOB-24964 to track this for Windows.", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-07-16T08:30:29.000+0000", "updated": "2017-07-16T08:30:29.000+0000" }, { "id": "424193", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "iOS part is merged. Thank you", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-07-16T11:02:51.000+0000", "updated": "2017-07-16T11:02:51.000+0000" }, { "id": "430653", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/9601", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-15T05:15:20.000+0000", "updated": "2017-11-15T05:15:20.000+0000" }, { "id": "430707", "author": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR passed; waiting for CR before merging.", "updateAuthor": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-15T10:52:09.000+0000", "updated": "2017-11-15T10:52:09.000+0000" }, { "id": "430764", "author": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR Merged.", "updateAuthor": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-16T00:48:31.000+0000", "updated": "2017-11-16T00:48:31.000+0000" }, { "id": "430773", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix in SDK 7.0.0.v20171115153702.\r\nClosing.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-16T01:54:11.000+0000", "updated": "2017-11-16T01:54:11.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }