Interface GeckoSession.CompositorScrollDelegate

Enclosing class:
GeckoSession

public static interface GeckoSession.CompositorScrollDelegate
GeckoSession applications implement this interface to handle scroll events.

Differences from ScrollDelegate:

  • onScrollChanged() is called as soon as the scroll change is composited visually. For scrolling triggered by user interaction, this notification can have a lower latency than ScrollDelegate.onScrollChanged().
  • In addition to the scroll position in pixels, the notification contains auxiliary information such as whether the scroll change was a result of user interaction. This can be extended over time as needed.
  • Method Details

    • onScrollChanged

      @UiThread default void onScrollChanged(@NonNull GeckoSession session, @NonNull GeckoSession.ScrollPositionUpdate update)
      The scroll position of the content has changed.
      Parameters:
      session - GeckoSession that initiated the callback.
      update - Information about the scroll position change.