I am trying to find out when the user scrolls to the top or bottom of the list, and he can no longer scroll.
Now I use OnScrollListener to find out which list items are visible.
listview.setOnScrollListener(new OnScrollListener() { @Override public void onScrollStateChanged(AbsListView view, int scrollState) { if (scrollState == OnScrollListener.SCROLL_STATE_IDLE) { } } @Override public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) { if (totalItemCount - visibleItemCount == firstVisibleItem) {
source share