I have implemented a list view, every user scroll to bottom screen, it auto add new data to list view Once the scroll has completed, onScroll() call for every new item that
To detect the item at the bottom of the screen you have to work with firstVisibleItem
and visibleItemCount
. I had created a demo example for the same using AsyncTask that will loading items in background and update the UI.
Total of firstVisibleItem
and visibleItemCount
will give you the number of items that are loaded and then you can implement the logic of loading more items.
int loadedItems = firstVisibleItem + visibleItemCount;