page.title=Supporting Swipe-to-Refresh trainingnavtop=true startpage=true @jd:body

Dependencies and prerequisites

Sample Apps

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.

Note: This class requires the latest version of the Android v4 Support Library APIs. If you have not used the Support Library before, follow the instructions in the Support Library Setup document.

Lessons

Adding Swipe-to-Refresh To Your App
To replay the movie, click on the device screen
Learn how to provide swipe-to-refresh support in a {@link android.widget.ListView} or {@link android.widget.GridView}, and how to provide an 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.