BaseRecyclerViewAdapterHelper icon indicating copy to clipboard operation
BaseRecyclerViewAdapterHelper copied to clipboard

4.1.4版本-->NestedScrollView中嵌套加载更多,会导致onLoad()一直被执行

Open runitwolf-sloop opened this issue 1 year ago • 0 comments

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>

runitwolf-sloop avatar Nov 04 '24 09:11 runitwolf-sloop