Chapter 25: Building a Simple Image Gallery App
Paging is the act of moving from page to page, and on Android, we do this by swiping a finger across the screen. When we do this, the current page transitions in a direction and speed to match the finger movement. This is a useful and practical way to navigate around an app but perhaps even more than this, it creates an extremely satisfying visual effect for the user. Also, as with the RecyclerView
widget, we can selectively load just the data required for the current page and perhaps the data for the previous and next pages.
The Android API, as you will have come to expect, has some solutions for achieving paging in quite a simple manner.
In this chapter, we will learn how to do the following:
- Achieve paging and swiping with images as you might find in a photo gallery app.
First, let's look at a swiping example.