Stuck in implementing Pagination in Android
<p>I am implementing pagination for ListView in Android . I am extending the BaseAdapater class for customising the ListView.</p>

<p>Already I have the code working fine for the Customised ListView.
Below is the new requirement.</p>

<p>1>I am fetching 6 items from server &amp; displaying them . Now when the user scrolls to the 6th item(end of list) , I need to call the server to fetch the next 6 items &amp; update the Listview</p>

<p>I have overriden the methods </p>

<p>i>public void onScroll(AbsListView view, int firstVisibleItem,int visibleItemCount, int totalItemCount) </p>

<p>ii>public void onScrollStateChanged(AbsListView view, int scrollState) </p>

<p>In the first response from the server, I get the total no of pages from the server &amp; for each time I call the server , I get the current page value .</p>

<p>Kindly provide me the steps/sample code on how to check the last item of the list &amp; update the list . The code should be iterative since I may need to call multiple times &amp; fetch from server.</p>

<p>Warm Regards,</p>

<p>CB</p>
