I was able to successfully write a service that downloads data from an RSS feed, parses it, and stores it in a database. I also have an activity fragment that uses the cursor loader technique to retrieve all rows of data and displays them on the screen in a horizontal listview I, removed from the Internet.
My next mission is to change the action so that I can continually request the next x number of rows each time the user scrolls closer to the end of the list and adds them to the listview . Technically, my data is small enough so that if I showed 10 lines at startup, I could just request an adapter for 20 and reset, but it seems silly to repeat the request for the same lines again.
So, in essence, my main question is: how best would I combine the contents of the listview currently populated with Cursor/CursorAdapter with the results of a new query using LoaderCallbacks ?
Second, what is the correct syntax for the SQLiteQueryBuilder limit parameter? I tried many options, although I think the line " offset, maxrows " is correct? No matter what I provide, although I always get 0 from getCount() on my cursor.
source share