Even if your app automatically updates its content on a regular basis, you can allow users to request manual updates as well. For example, a weather forecasting app can allow users 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 allows users to trigger an update with a vertical swipe.
Download the sample apps:
Lessons
- Adding Swipe-to-Refresh To Your App
-
Learn how to provide swipe-to-refresh support in a
ListView
orGridView
, and how to provide a more accessible refresh option using the action bar. - Responding 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 action.