对于变化你会考虑收听滚动条。
要使用滚动状态更改侦听器,我希望它将用于为您获取解决方案...
listStudies.setOnScrollListener(new OnScrollListener() {
@Override
public void onScrollStateChanged(AbsListView view, int scrollState) {
if ((MainActivity.listsize - MainActivity.currentlistitemposition) <= 3
&& listagain == 0) {
listagain = 1;
System.out.println(MainActivity.listsize);
System.out.println(MainActivity.currentlistitemposition);
currentPage++;
try {
performRequest(currentPage);
} catch (Exception e) {
// Toast.makeText(MainActivity.this,
// "Error occuered during the Request...",
// Toast.LENGTH_SHORT).show();
}
}
}
@Override
public void onScroll(AbsListView view, int firstVisibleItem,
int visibleItemCount, int totalItemCount) {
}
});
因为我也在使用 chrisbanes PullToRefresh lib 所以我希望它对你有用..祝你好运......