Interface View.OnScrollChangeListener

Enclosing class:
View
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface View.OnScrollChangeListener
Interface definition for a callback to be invoked when the scroll X or Y positions of a view change.

Note: Some views handle scrolling independently of View and may have their own separate listeners for scroll-type events.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onScrollChange(View v, int scrollX, int scrollY, int oldScrollX, int oldScrollY)
    Called when the scroll position of a view changes.
  • Method Details

    • onScrollChange

      void onScrollChange(View v, int scrollX, int scrollY, int oldScrollX, int oldScrollY)
      Called when the scroll position of a view changes.
      Parameters:
      v - The view whose scroll position has changed.
      scrollX - Current horizontal scroll origin.
      scrollY - Current vertical scroll origin.
      oldScrollX - Previous horizontal scroll origin.
      oldScrollY - Previous vertical scroll origin.