{ "id": "173659", "key": "TIMOB-27349", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": [], "resolution": null, "resolutiondate": null, "created": "2019-05-22T16:27:57.000+0000", "priority": null, "labels": [ "android" ], "versions": [], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2019-08-23T14:55:32.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [], "description": "Currently implementing a spreadsheet viewer. In iOS, I am able to scroll the spreadsheet both vertically and horizontally:\r\n\r\n{code:xml}\r\n\r\n\t\r\n\r\n{code}\r\n\r\n\r\nFor Android, I can only choose a single scroll direction. \r\n\r\nMy current workaround is to wrap the scrollview in a \"sensorView\" so that I have touch sensor stacked on top of the scrollview. \r\n\r\n{code:xml}\r\n\r\n \r\n \r\n \r\n \r\n\r\n{code}\r\n\r\n\r\n{code:javascript}\r\nfunction dataTouchstart(e) {\r\n e.x = Ti.UI.convertUnits(e.x + \"px\", \"dip\");\r\n e.y = Ti.UI.convertUnits(e.y + \"px\", \"dip\");\r\n startX = e.x;\r\n startY = e.y;\r\n initialLeft = $.rows.left;\r\n initialTop = $.rows.top;\r\n}\r\n\r\nfunction dataTouchmove(e) {\r\n e.x = Ti.UI.convertUnits(e.x + \"px\", \"dip\");\r\n e.y = Ti.UI.convertUnits(e.y + \"px\", \"dip\");\r\n deltaX = (e.x - startX);\r\n deltaY = (e.y - startY);\r\n newXPos = initialLeft + deltaX;\r\n newYPos = initialTop + deltaY;\r\n var widthDif = ($.main.rect.width - $.rows.width);\r\n var heightDif = ($.main.rect.height - $.rows.rect.height);\r\n $.rows.left = (newXPos > 0) ? 0 : (newXPos < widthDif) ? widthDif : newXPos;\r\n $.rows.top = (newYPos > 0) ? 0 : (newYPos < heightDif) ? heightDif : newYPos;\r\n}\r\n{code}\r\n\r\ndataTouchstart/dataTouchmove will move rows view both horizontally and vertically. \r\n\r\nIs there possibly a better way to do this for Android? In iOS, I am able to perform touch events on the rows view. In Android, the \"sensor\" sibling view covers the rows view so that I can no longer perform touch events on rows view. \r\n", "attachment": [], "flagged": false, "summary": "Android scroll both directions", "creator": { "name": "nmartin", "key": "nmartin", "displayName": "Nathan Martin", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "nmartin", "key": "nmartin", "displayName": "Nathan Martin", "active": true, "timeZone": "America/Chicago" }, "environment": "Android, Titanium SDK 8.0.0.GA", "comment": { "comments": [], "maxResults": 1, "total": 1, "startAt": 0 } } }