Let me start by saying that this is NOT a question about scrolling ListViews. I donโt want to know how to say when the user scrolls to the bottom of the list, so please donโt give me answers to this question or mark it as a duplicate.
I use a class that extends AsyncTaskLoader to populate a ListView with data from a web service.
First I load 50 items and everything works fine. I need to know how to tell the loader to load the next 50 items in stages. I understand WHERE to do this in ListView code, but I cannot find a better way to tell the loader that I want to load more data without reloading it and not loading everything again.
Again, to clarify, the problem I'm trying to solve here simply notifies the bootloader to download more data. He already knows how to load more data when loadInBackground () is called a second time, and the ListView already knows where / when to notify the loader, the question is exactly how.
Some of the relevant code:
@Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); m_adapter = new SearchAdapter(getActivity()); setListAdapter(m_adapter);
source share