Hình 1. Thao tác vuốt để làm mới cập nhật ứng dụng thời tiết.
Ngay cả khi ứng dụng của bạn tự động cập nhật nội dung thường xuyên, bạn cũng có thể cho phép người dùng yêu cầu cập nhật theo cách thủ công. Ví dụ: ứng dụng dự báo thời tiết có thể cho phép người dùng làm mới ứng dụng để nhận thông tin dự báo mới nhất theo yêu cầu. Để mang lại trải nghiệm người dùng tiêu chuẩn khi yêu cầu cập nhật, nền tảng Android có mẫu thiết kế vuốt để làm mới, cho phép người dùng kích hoạt bản cập nhật bằng thao tác vuốt dọc.
Hãy tìm hiểu cách phản hồi cử chỉ vuốt để làm mới và cách thực hiện cùng một thao tác cập nhật từ thao tác làm mới thanh thao tác.
Nội dung và mã mẫu trên trang này phải tuân thủ các giấy phép như mô tả trong phần Giấy phép nội dung. Java và OpenJDK là nhãn hiệu hoặc nhãn hiệu đã đăng ký của Oracle và/hoặc đơn vị liên kết của Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[],[],null,["# About swipe-to-refresh\n\nTry the Compose way \nJetpack Compose is the recommended UI toolkit for Android. Learn how to pull to refresh in Compose. \n[Pull to refresh in Compose →](/develop/ui/compose/components/pull-to-refresh) \n**Figure 1.** A swipe-to-refresh action updating a weather app.\n\nEven if your app automatically updates its content on a regular basis, you can also let users\nrequest manual updates. For example, a weather forecasting app can let users refresh the app to get\nthe latest forecasts on demand. To provide a standard user experience for requesting updates, the\nAndroid platform includes the swipe-to-refresh design pattern, which lets users trigger an update\nwith a vertical swipe.\n\nDownload the sample apps:\n\n- [SwipeRefreshLayoutBasic](https://github.com/android/views-widgets-samples/tree/main/SwipeRefreshLayoutBasic)\n- [SwipeRefreshMultipleViews](https://github.com/android/views-widgets-samples/tree/main/SwipeRefreshMultipleViews/)\n\nLessons\n-------\n\n\n**[Add swipe-to-refresh to your app](/develop/ui/views/touch-and-input/swipe/add-swipe-interface)**\n:\n Learn how to provide swipe-to-refresh support in a\n [RecyclerView](/reference/androidx/recyclerview/widget/RecyclerView)\n and how to provide a more accessible refresh option using the action bar.\n\n\n**[Respond to a refresh request](/develop/ui/views/touch-and-input/swipe/respond-refresh-request)**\n:\n Learn how to respond to the swipe-to-refresh gesture and how to perform the same update from an\n action bar refresh action."]]