For this challenge, it is pretty obvious that the fetchItems() method should have its no argument signature changed to accept an integer argument representing the page to be retrieved, and modify the builder to append a page parameter.
I would like to scroll down to the bottom of a displayed page, and if the displayed page is not the last page, trigger a fetch for the next page, and instead of appending it to the current page, replace the current page with it.
Similarly, if I scroll to the top and the displayed page is not the first page, trigger a fetch for the previous page, replace the current page with it.
I would like to get your input on the best way to go about this.
I’m guessing that in addition to setting an onScrollListener on mRecycleView in PhotoGalleryFragment, we would need to keep track of whether we are at the first page, or last page, the current page number