有没有可以调用的方法来找出滚动没有起作用?
或者是否有任何可以设置为在列表视图停止滚动时调用的侦听器?
提前致谢!
listView.setOnScrollListener(new OnScrollListener() {
@Override
public void onScrollStateChanged(AbsListView view, int scrollState) {
switch (scrollState) {
case OnScrollListener.SCROLL_STATE_IDLE:
Log.i("", "here scrolling is finished");
break;
case OnScrollListener.SCROLL_STATE_TOUCH_SCROLL:
Log.i("", "here scrolling is finished");
case OnScrollListener.SCROLL_STATE_FLING:
Log.i("", "its scrolling....");
break;
default:
break;
}
}
祝你好运...
您需要实现OnScrollListener
which 提供的方法可以帮助您检测ListView
. 阅读这篇文章。