Swiperefreshlayout
最近更新時間 | 穩定版 | 候選版 | Beta 版 | Alpha 版 |
---|---|---|---|---|
2020 年 7 月 22 日 | 1.1.0 | - | - | 1.2.0-alpha01 |
宣告依附元件
如要在 SwipeRefreshLayout 中新增依附元件,必須將 Google Maven 存放區新增至專案。詳情請參閱 Google Maven 存放區。
在應用程式或模組的 build.gradle
檔案中,新增需要的成果的依附元件:
Groovy
dependencies { implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0" }
Kotlin
dependencies { implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0") }
如要進一步瞭解依附元件,請參閱新增建構依附元件一文。
意見回饋
您的意見可協助我們改善 Jetpack。發現新的問題或有改善這個程式庫的想法時,請告訴我們。請先查看此程式庫中的現有問題,再建立新的問題。只要按一下星號按鈕,即可投票給現有的問題。
詳情請參閱 Issue Tracker 說明文件。
1.2.0 版本
1.2.0-alpha01 版本
2020 年 7 月 22 日
androidx.swiperefreshlayout:swiperefreshlayout:1.2.0-alpha01
發佈。1.2.0-alpha01 版本包含這些修訂版本。
修正錯誤
requestDisallowInterceptTouchEvent(boolean)
現在會回應要求,與其他 ViewGroup 一樣。雖然我們不鼓勵這樣做,但可以透過setLegacyRequestDisallowInterceptTouchEventEnabled
停用新的行為。(I968da, b/141855018)
1.1.0 版本
1.1.0 版本
2020 年 6 月 24 日
androidx.swiperefreshlayout:swiperefreshlayout:1.1.0
發佈。1.1.0 版含有這些修訂版本。
自 1.0.0 版起的重大異動
SwipeRefreshLayout
現已實作NestedScrollingChild3
及NestedScrollingParent3
。
1.1.0-rc01 版本
2020 年 4 月 15 日
androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-rc01
自 1.1.0-beta01
起沒有變更。1.1.0-rc01 版包含這些修訂版本。
1.1.0-beta01 版本
2020 年 3 月 4 日
androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-beta01
自 1.1.0-alpha03
起沒有變更。1.1.0-beta01 版包含這些修訂版本。
1.1.0-alpha03 版本
2019 年 10 月 9 日
androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha03
發佈。1.1.0-alpha03 版本包含這些修訂版本。
新功能
- 我們使用新的樣式屬性
R.styleable.SwipeRefreshLayout_swipeRefreshLayoutProgressSpinnerBackgroundColor
來設定進度指標的背景顏色。(aosp/931124)
API 異動
requestDisallowInterceptTouchEvent(boolean)
現在一律向上傳播到父項。雖然我們不鼓勵這樣做,但可以透過setLegacyRequestDisallowInterceptTouchEventEnabled
停用新的行為。(aosp/1108540)
修正錯誤
- 修正了巢狀結構的捲動問題,其中 SwipeRefreshLayout 含有捲動父項(例如 ViewPager2)及捲動子項。(b/138314213)
1.1.0-alpha02 版本
2019 年 7 月 2 日
androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02
發佈。您可以前往這裡查看這個版本包含的修訂版本。
修正錯誤
- 實作儲存及還原 SwipeRefreshLayout 的重新整理狀態
- 修正了在 RecyclerView 中嵌入 SwipeRefreshLayout 時的可用性錯誤
1.1.0-alpha01 版本
2018 年 12 月 3 日
API 異動
- aosp/737631:
SwipeRefreshLayout
現在實作NestedScrollingChild3
及NestedScrollingParent3
,巢狀結構捲動的 3 個父項及子項能夠將消耗的巢狀結構捲動距離資訊傳遞至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[])
。