listView滚动事件

listView滚动事件

实现接口:

android.widget.AbsListView.OnScrollListener
Interface definition for a callback to be invoked when the list or grid has been scrolled.

实现接口的抽象方法

public void onScrollStateChanged(AbsListView view, int scrollState)

public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount)

回调方法onScroll说明:

Callback method to be invoked when the list or grid has been scrolled. This will be called after the scroll has completed

Specified by: onScroll(...) in OnScrollListener
Parameters:
view The view whose scroll state is being reported
firstVisibleItem the index of the first visible cell (ignore if visibleItemCount == 0)
visibleItemCount the number of visible cells
totalItemCount the number of items in the list adaptor

你可能感兴趣的:(ListView)