Challenge: Paging

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

For this challenge, research the Jetpack Paging Library (developer.android.com/​topic/​libraries/​architecture/​paging) and use it to implement paging for PhotoGallery. This library provides a framework for loading your app’s data when it is needed. While you could implement this functionality manually, the paging library will be less work and less prone to error.

Get Android Programming: The Big Nerd Ranch Guide, 4th Edition 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.