About swipe-to-refresh

Try the Compose way
Jetpack Compose is the recommended UI toolkit for Android. Learn how to pull to refresh in Compose.
Figure 1. A swipe-to-refresh action updating a weather app.

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.

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2025年02月10日 UTC.