संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
Swiperefreshlayout
स्वाइप करके रीफ़्रेश करने की सुविधा के लिए यूज़र इंटरफ़ेस (यूआई) पैटर्न लागू करें.
नया अपडेट |
रिलीज़ किया गया जांचा और परखा हुआ वर्शन |
रिलीज़ कैंडिडेट |
बीटा रिलीज़ |
ऐल्फ़ा रिलीज़ |
12 फ़रवरी, 2025 |
1.1.0 |
- |
1.2.0-beta01 |
- |
डिपेंडेंसी का एलान करना
SwipeRefreshLayout पर डिपेंडेंसी जोड़ने के लिए, आपको अपने प्रोजेक्ट में Google Maven रिपॉज़िटरी जोड़नी होगी. ज़्यादा जानकारी के लिए, Google की Maven रिपॉज़िटरी पढ़ें.
अपने ऐप्लिकेशन या मॉड्यूल के लिए, build.gradle
फ़ाइल में उन आर्टफ़ैक्ट की डिपेंडेंसी जोड़ें जिनकी आपको ज़रूरत है:
ग्रूवी
dependencies {
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
}
Kotlin
dependencies {
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0")
}
डिपेंडेंसी के बारे में ज़्यादा जानने के लिए, बिल्ड डिपेंडेंसी जोड़ना लेख पढ़ें.
सुझाव/राय दें या शिकायत करें
आपके सुझाव, शिकायत या राय से हमें Jetpack को बेहतर बनाने में मदद मिलती है. अगर आपको कोई नई समस्या मिलती है या इस लाइब्रेरी को बेहतर बनाने के लिए आपके पास कोई सुझाव है, तो हमें बताएं. नई लाइब्रेरी बनाने से पहले, कृपया इस लाइब्रेरी में मौजूद मौजूदा समस्याओं पर एक नज़र डालें. स्टार बटन पर क्लिक करके, किसी मौजूदा समस्या पर अपना वोट जोड़ा जा सकता है.
नई समस्या बनाना
ज़्यादा जानकारी के लिए, समस्या ट्रैकर का दस्तावेज़ देखें.
वर्शन 1.2.0
वर्शन 1.2.0-beta01
12 फ़रवरी, 2025
androidx.swiperefreshlayout:swiperefreshlayout:1.2.0-beta01
रिलीज़ हो गया है. वर्शन 1.2.0-beta01 में ये कमिट शामिल हैं.
एपीआई में हुए बदलाव
SwipeRefreshLayout
मैथड के पैरामीटर और रिटर्न टाइप के लिए, वैल्यू न होने की स्थिति के बारे में बताया गया है (I006d1, b/236497776)
गड़बड़ियां ठीक की गईं
- यह लाइब्रेरी अब JSpecify nullness एनोटेशन का इस्तेमाल करती है, जो टाइप-इस्तेमाल के लिए हैं. Kotlin डेवलपर को सही तरीके से इस्तेमाल करने के लिए, कंपाइलर के इस आर्ग्युमेंट का इस्तेमाल करना चाहिए:
-Xjspecify-annotations=strict
(यह Kotlin कंपाइलर के 2.1.0 वर्शन से डिफ़ॉल्ट रूप से लागू होता है). (Iaf490, b/326456246)
वर्शन 1.2.0-alpha01
22 जुलाई, 2020
androidx.swiperefreshlayout:swiperefreshlayout:1.2.0-alpha01
रिलीज़ हो गया है. 1.2.0-alpha01 वर्शन में ये बदलाव शामिल हैं.
गड़बड़ियां ठीक की गईं
requestDisallowInterceptTouchEvent(boolean)
अब किसी भी दूसरे ViewGroup की तरह ही अनुरोध को पूरा करता है. हम इस सुविधा का इस्तेमाल करने का सुझाव नहीं देते. हालांकि, setLegacyRequestDisallowInterceptTouchEventEnabled
का इस्तेमाल करके, इसे बंद किया जा सकता है. (I968da, b/141855018)
वर्शन 1.1.0
वर्शन 1.1.0
24 जून, 2020
androidx.swiperefreshlayout:swiperefreshlayout:1.1.0
रिलीज़ हो गया है. 1.1.0 वर्शन में ये बदलाव शामिल हैं.
1.0.0 के बाद किए गए मुख्य बदलाव
SwipeRefreshLayout
अब NestedScrollingChild3
और NestedScrollingParent3
को लागू करता है.
वर्शन 1.1.0-rc01
15 अप्रैल, 2020
androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-rc01
को 1.1.0-beta01
से बिना किसी बदलाव के रिलीज़ किया गया है. 1.1.0-rc01 वर्शन में ये बदलाव शामिल हैं.
वर्शन 1.1.0-beta01
4 मार्च, 2020
androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-beta01
को 1.1.0-alpha03
से बिना किसी बदलाव के रिलीज़ किया गया है. 1.1.0-beta01 वर्शन में ये बदलाव शामिल हैं.
वर्शन 1.1.0-alpha03
9 अक्टूबर, 2019
androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha03
रिलीज़ हो गया है. 1.1.0-alpha03 वर्शन में ये बदलाव शामिल हैं.
नई सुविधाएं
- हमारे पास एक नया स्टाइल एट्रिब्यूट
R.styleable.SwipeRefreshLayout_swipeRefreshLayoutProgressSpinnerBackgroundColor
है, जिसकी मदद से प्रोग्रेस इंडिकेटर का बैकग्राउंड कलर सेट किया जा सकता है. (aosp/931124)
एपीआई में हुए बदलाव
requestDisallowInterceptTouchEvent(boolean)
अब हमेशा अपने पैरंट तक प्रॉपगेट करता है. हम इस नए तरीके का सुझाव नहीं देते. हालांकि, setLegacyRequestDisallowInterceptTouchEventEnabled
का इस्तेमाल करके इसे बंद किया जा सकता है. (aosp/1108540)
गड़बड़ियां ठीक की गईं
- नेस्ट किए गए स्क्रोलिंग की समस्या को ठीक किया गया है. यह समस्या तब आती है, जब SwipeRefreshLayout में स्क्रोल किया जा सकने वाला पैरंट (जैसे, ViewPager2) और स्क्रोल किया जा सकने वाला चाइल्ड होता है. (b/138314213)
वर्शन 1.1.0-alpha02
2 जुलाई, 2019
androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02
रिलीज़ हो गया है. इस वर्शन में शामिल किए गए कमिट यहां देखे जा सकते हैं.
गड़बड़ियां ठीक की गईं
- SwipeRefreshLayout की रीफ़्रेश करने की स्थिति को सेव और वापस लाने की सुविधा लागू की गई
- SwipeRefreshLayout को RecyclerView में एम्बेड करने पर, इस्तेमाल करने से जुड़ी गड़बड़ी को ठीक किया गया
वर्शन 1.1.0-alpha01
3 दिसंबर, 2018
एपीआई में हुए बदलाव
- aosp/737631:
SwipeRefreshLayout
में अब NestedScrollingChild3
और NestedScrollingParent3
लागू किए गए हैं. इससे नेस्ट किए गए स्क्रोलिंग के तीन पैरंट और बच्चों को, नेस्ट किए गए स्क्रोलिंग की दूरी की जानकारी SwipeRefreshLayout
के ज़रिए भेजने में मदद मिलती है. अगर डेवलपर कोड फ़िलहाल SwipeRefreshLayout.onNestedScroll(View, int, int, int, int, int)
को बदलता है, तो हो सकता है कि उसे अब कॉल न किया जाए. इसके बजाय, SwipeRefreshLayout.onNestedScroll(View, int, int, int, int, int, int[])
को बदला जाना चाहिए. इसी तरह, SwipeRefreshLayout.dispatchNestedScroll(int, int, int, int, int[], int)
को शायद अब कॉल न किया जाए और इसके बजाय SwipeRefreshLayout.dispatchNestedScroll(int, int, int, int, int[], int, int[])
को बदल दिया जाए.
इस पेज पर मौजूद कॉन्टेंट और कोड सैंपल कॉन्टेंट के लाइसेंस में बताए गए लाइसेंस के हिसाब से हैं. Java और OpenJDK, Oracle और/या इससे जुड़ी हुई कंपनियों के ट्रेडमार्क या रजिस्टर किए हुए ट्रेडमार्क हैं.
आखिरी बार 2025-07-27 (UTC) को अपडेट किया गया.
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 2025-07-27 (UTC) को अपडेट किया गया."],[],[],null,["# Swiperefreshlayout\n==================\n\n[Code Sample](https://github.com/android/views-widgets-samples) \nAPI Reference \n[androidx.swiperefreshlayout.widget](/reference/kotlin/androidx/swiperefreshlayout/widget/package-summary) \nImplement the swipe-to-refresh UI pattern. \n\n| Latest Update | Stable Release | Release Candidate | Beta Release | Alpha Release |\n|-------------------|--------------------------------------------------------------|-------------------|----------------------------------------------------------------------------|---------------|\n| February 12, 2025 | [1.1.0](/jetpack/androidx/releases/swiperefreshlayout#1.1.0) | - | [1.2.0-beta01](/jetpack/androidx/releases/swiperefreshlayout#1.2.0-beta01) | - |\n\nDeclaring dependencies\n----------------------\n\nTo add a dependency on SwipeRefreshLayout, you must add the Google Maven repository to your\nproject. Read [Google's Maven repository](/studio/build/dependencies#google-maven)\nfor more information.\n\nAdd the dependencies for the artifacts you need in the `build.gradle` file for\nyour app or module: \n\n### Groovy\n\n```groovy\ndependencies {\n implementation \"androidx.swiperefreshlayout:swiperefreshlayout:1.1.0\"\n}\n```\n\n### Kotlin\n\n```kotlin\ndependencies {\n implementation(\"androidx.swiperefreshlayout:swiperefreshlayout:1.1.0\")\n}\n```\n\nFor more information about dependencies, see [Add build dependencies](/studio/build/dependencies).\n\nFeedback\n--------\n\nYour feedback helps make Jetpack better. Let us know if you discover new issues or have\nideas for improving this library. Please take a look at the\n[existing issues](https://issuetracker.google.com/issues?q=componentid:460836%20status:open)\nin this library before you create a new one. You can add your vote to an existing issue by\nclicking the star button.\n\n[Create a new issue](https://issuetracker.google.com/issues/new?component=460836&template=1422576)\n\nSee the [Issue Tracker documentation](https://developers.google.com/issue-tracker)\nfor more information.\n\nVersion 1.2.0\n-------------\n\n### Version 1.2.0-beta01\n\nFebruary 12, 2025\n\n`androidx.swiperefreshlayout:swiperefreshlayout:1.2.0-beta01` is released. Version 1.2.0-beta01 contains [these commits](https://android.googlesource.com/platform/frameworks/support/+log/9f60cc700129e30cee9df020005c317fb39d32ec..7344269b2d862d014a647efafcd7735f0d53f1da/swiperefreshlayout/swiperefreshlayout).\n\n**API Changes**\n\n- Specified nullability of `SwipeRefreshLayout` method parameters and return types ([I006d1](https://android-review.googlesource.com/#/q/I006d15100662ca77db65dd0cf4735c65cee84dfd), [b/236497776](https://issuetracker.google.com/issues/236497776))\n\n**Bug Fixes**\n\n- This library now uses [JSpecify nullness annotations](https://jspecify.dev/), which are type-use. Kotlin developers should use the following compiler argument to enforce correct usage: `-Xjspecify-annotations=strict` (this is the default starting with version 2.1.0 of the Kotlin compiler). ([Iaf490](https://android-review.googlesource.com/#/q/Iaf49080833b450a7dbba982367bfd863a2ead6ad), [b/326456246](https://issuetracker.google.com/issues/326456246))\n\n### Version 1.2.0-alpha01\n\nJuly 22, 2020\n\n`androidx.swiperefreshlayout:swiperefreshlayout:1.2.0-alpha01` is released. [Version 1.2.0-alpha01 contains these commits.](https://android.googlesource.com/platform/frameworks/support/+log/6b97b146b743340c9d9b6fa54e735404374f2a5f..9f60cc700129e30cee9df020005c317fb39d32ec/swiperefreshlayout/swiperefreshlayout)\n\n**Bug Fixes**\n\n- `requestDisallowInterceptTouchEvent(boolean)` now honors the request like any other ViewGroup. While strongly discouraged, new behavior can be disabled with `setLegacyRequestDisallowInterceptTouchEventEnabled`. ([I968da](https://android-review.googlesource.com/#/q/I968da769d8400caf6f52c8a12595ee19fb4c0773), [b/141855018](https://issuetracker.google.com/issues/141855018))\n\nVersion 1.1.0\n-------------\n\n### Version 1.1.0\n\nJune 24, 2020\n\n`androidx.swiperefreshlayout:swiperefreshlayout:1.1.0` is released. [Version 1.1.0 contains these commits.](https://android.googlesource.com/platform/frameworks/support/+log/6563b7854e79a3f7182efe27ee726867a091b603..6b97b146b743340c9d9b6fa54e735404374f2a5f/swiperefreshlayout/swiperefreshlayout)\n\n**Major changes since 1.0.0**\n\n- `SwipeRefreshLayout` now implements `NestedScrollingChild3` and `NestedScrollingParent3`.\n\n### Version 1.1.0-rc01\n\nApril 15, 2020\n\n`androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-rc01` is released with no changes since `1.1.0-beta01`. [Version 1.1.0-rc01 contains these commits.](https://android.googlesource.com/platform/frameworks/support/+log/666ae665acfcfa2a20eccc18e4494808169742f4..6563b7854e79a3f7182efe27ee726867a091b603/swiperefreshlayout/swiperefreshlayout)\n\n### Version 1.1.0-beta01\n\nMarch 4, 2020\n\n`androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-beta01` is released with no changes since `1.1.0-alpha03`. [Version 1.1.0-beta01 contains these commits.](https://android.googlesource.com/platform/frameworks/support/+log/f14ad350142290622d1645e1d0e280cbe8ca4c2f..666ae665acfcfa2a20eccc18e4494808169742f4/swiperefreshlayout/swiperefreshlayout)\n\n### Version 1.1.0-alpha03\n\nOctober 9, 2019\n\n`androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha03` is released. [Version 1.1.0-alpha03 contains these commits](https://android.googlesource.com/platform/frameworks/support/+log/9a7b3cb32a2c7adac9b7af4bc2f996f1eb79fc12..f14ad350142290622d1645e1d0e280cbe8ca4c2f/swiperefreshlayout).\n\n**New features**\n\n- We have a new style attribute `R.styleable.SwipeRefreshLayout_swipeRefreshLayoutProgressSpinnerBackgroundColor`to set the background color of the progress indicator. ([aosp/931124](https://android-review.googlesource.com/931124))\n\n**API changes**\n\n- `requestDisallowInterceptTouchEvent(boolean)` now always propagates up to its parents. While strongly discouraged, new behavior can be disabled with `setLegacyRequestDisallowInterceptTouchEventEnabled`. ([aosp/1108540](https://android-review.googlesource.com/1108540))\n\n**Bug fixes**\n\n- Fixed issue with nested scrolling where SwipeRefreshLayout has a scrollable parent (e.g. [ViewPager2](/jetpack/androidx/releases/viewpager2)) and a scrollable child. ([b/138314213](https://issuetracker.google.com/issues/138314213))\n\n### Version 1.1.0-alpha02\n\nJuly 2, 2019\n\n`androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02` is released. The commits included in this version can be found [here](https://android.googlesource.com/platform/frameworks/support/+log/d9ca300b3f70db75744a6d743f85e3784287434a..9a7b3cb32a2c7adac9b7af4bc2f996f1eb79fc12/swiperefreshlayout).\n| **Note:** This version is dependent on the Java 8 programming language. Please read [Use Java 8 language features](/studio/write/java8-support) to learn how to use it in your project.\n\n**Bug fixes**\n\n- Implemented saving and restoring of the refreshing state of SwipeRefreshLayout\n- Fixed usability bug when SwipeRefreshLayout is embedded in a RecyclerView\n\n### Version 1.1.0-alpha01\n\nDecember 3, 2018\n\n**API changes**\n\n- [aosp/737631](): `SwipeRefreshLayout` now implements `NestedScrollingChild3` and `NestedScrollingParent3`, enabling nested scrolling 3 parents and children to pass consumed nested scrolling distance information through `SwipeRefreshLayout`. If developer code currently overrides `SwipeRefreshLayout.onNestedScroll(View, int, int, int, int, int)`, it will likely no longer be called and `SwipeRefreshLayout.onNestedScroll(View, int, int, int, int, int, int[])` should be overridden instead. Likewise, `SwipeRefreshLayout.dispatchNestedScroll(int, int, int, int, int[], int)` will likely no longer be called and `SwipeRefreshLayout.dispatchNestedScroll(int, int, int, int, int[], int, int[])` should be overridden instead."]]