The Glass Explorer Edition SDK is deprecated. This documentation remains as a historical reference.
GestureDetector.ScrollListener
Stay organized with collections
Save and categorize content based on your preferences.
This listener receives continuous horizontal scrolling events independent of the finger
count.
Public Methods |
abstract
boolean
|
onScroll(float displacement, float delta, float velocity)
|
Public Methods
Called while the user is scrolling after initial horizontal scroll.
Parameters
displacement
| distance between current event and first down event x value |
delta
| delta between two consecutive x motion events |
velocity
| velocity of current x motion event |
Returns
true
if the events were handled
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[[["Introduced in API level XE12, this listener focuses on continuous horizontal scrolling events, irrespective of the number of fingers used."],["The `onScroll` method is triggered during scrolling after the initial horizontal movement, providing details on scroll distance, change between events, and current velocity."],["This listener utilizes the `GestureDetector.ScrollListener` interface and requires implementation of the `onScroll` method which should return `true` if the scroll event is handled."]]],[]]