Even if your app automatically updates its content on a regular basis, you can also let users request manual updates. For example, a weather forecasting app can let users refresh the app to get the latest forecasts on demand. To provide a standard user experience for requesting updates, the Android platform includes the swipe-to-refresh design pattern, which lets users trigger an update with a vertical swipe.
Download the sample apps:
Lessons
- Add swipe-to-refresh to your app
-
Learn how to provide swipe-to-refresh support in a
RecyclerView
and how to provide a more accessible refresh option using the action bar. - Respond to a refresh request
- Learn how to respond to the swipe-to-refresh gesture and how to perform the same update from an action bar refresh action.