Challenge: Paging

By default, getRecent returns one page of 100 results. There is an additional parameter you can use called page that will let you return page two, three, and so on.

For this challenge, add code to your adapter that detects when you are at the end of your array of items and replaces the current page with the next page of results. For a slightly harder challenge, append subsequent pages to your results.

Get Android Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.