NestedScrollView.OnScrollChangeListener

interface NestedScrollView.OnScrollChangeListener


Interface definition for a callback to be invoked when the scroll X or Y positions of a view change.

This version of the interface works on all versions of Android, back to API v4.

Summary

Public methods

abstract void
onScrollChange(
    @NonNull NestedScrollView v,
    int scrollX,
    int scrollY,
    int oldScrollX,
    int oldScrollY
)

Called when the scroll position of a view changes.

Public methods

onScrollChange

abstract void onScrollChange(
    @NonNull NestedScrollView v,
    int scrollX,
    int scrollY,
    int oldScrollX,
    int oldScrollY
)

Called when the scroll position of a view changes.

Parameters
@NonNull NestedScrollView v

The view whose scroll position has changed.

int scrollX

Current horizontal scroll origin.

int scrollY

Current vertical scroll origin.

int oldScrollX

Previous horizontal scroll origin.

int oldScrollY

Previous vertical scroll origin.