Most visited

Recently visited

Added in API level 23

View.OnScrollChangeListener

public static interface View.OnScrollChangeListener

android.view.View.OnScrollChangeListener


当视图的滚动X或Y位置改变时调用回调的接口定义。

注意:一些视图可以独立于View处理滚动,并且可以为滚动类型事件分别拥有自己的侦听器。 例如, ListView允许客户注册AbsListView.OnScrollListener来监听列表滚动位置的更改。

也可以看看:

Summary

Public methods

abstract void onScrollChange(View v, int scrollX, int scrollY, int oldScrollX, int oldScrollY)

当视图的滚动位置改变时调用。

Public methods

onScrollChange

Added in API level 23
void onScrollChange (View v, 
                int scrollX, 
                int scrollY, 
                int oldScrollX, 
                int oldScrollY)

当视图的滚动位置改变时调用。

Parameters
v View: The view whose scroll position has changed.
scrollX int: Current horizontal scroll origin.
scrollY int: Current vertical scroll origin.
oldScrollX int: Previous horizontal scroll origin.
oldScrollY int: Previous vertical scroll origin.

Hooray!