Open runitwolf-sloop opened 3 weeks ago
helper = new QuickAdapterHelper.Builder(adapter) .setTrailingLoadStateAdapter(new TrailingLoadStateAdapter.OnTrailingListener() { @Override public void onLoad() { request() } @Override public void onFailRetry() { request() } @Override public boolean isAllowLoading() { return !binding.swipeRefreshLayout.isRefreshing(); } }).build();
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout android:id="@+id/swipeRefreshLayout" android:layout_width="match_parent" android:layout_height="match_parent"> <androidx.core.widget.NestedScrollView android:layout_width="match_parent" android:layout_height="wrap_content" android:fillViewport="true"> <androidx.recyclerview.widget.RecyclerView android:id="@+id/recycleview" android:nestedScrollingEnabled="false" android:layout_width="match_parent" android:layout_height="wrap_content" /> </androidx.core.widget.NestedScrollView> </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>