File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
app/src/main/java/com/king/ultraswiperefresh/app/sample Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,8 @@ fun ClassicRefreshAutoLoadSample() {
105105 loadMoreTriggerRate = 0.1f ,
106106 loadMoreEnabled = hasMoreData,
107107 onCollapseScroll = {
108- if (state.footerState == UltraSwipeFooterState .Loading ) {
108+ // 小于0时表示:由下拉刷新收起时触发的,大于0时表示:由上拉加载收起时触发的
109+ if (it > 0f ) {
109110 // 同步滚动列表位置,消除视觉回弹
110111 lazyListState.animateScrollBy(it)
111112 }
Original file line number Diff line number Diff line change 11package com.king.ultraswiperefresh.app.sample
22
3+ import android.util.Log
34import androidx.compose.foundation.background
45import androidx.compose.foundation.gestures.animateScrollBy
56import androidx.compose.foundation.layout.Box
@@ -78,7 +79,8 @@ fun ClassicRefreshIndicatorSample() {
7879 },
7980 modifier = Modifier .background(color = Color (0x7FEEEEEE )),
8081 onCollapseScroll = {
81- if (state.footerState == UltraSwipeFooterState .Loading ) {
82+ // 小于0时表示:由下拉刷新收起时触发的,大于0时表示:由上拉加载收起时触发的
83+ if (it > 0f ) {
8284 // 同步滚动列表位置,消除视觉回弹
8385 lazyListState.animateScrollBy(it)
8486 }
You can’t perform that action at this time.
0 commit comments