CymChad / BaseRecyclerViewAdapterHelper

BRVAH:Powerful and flexible RecyclerAdapter
http://www.recyclerview.org/
MIT License
24.3k stars 5.15k forks source link

NestedScrollView+嵌套+RecyclerView问题 #3859

Open gaohequan opened 5 months ago

gaohequan commented 5 months ago

Describe the bug 使用的是4.1.4开源库和github中demo。 当NestedScrollView+嵌套+RecyclerView 会发现helper = QuickAdapterHelper.Builder(mAdapter) .setTrailingLoadStateAdapter(object : OnTrailingListener { override fun onLoad() { request() }

            override fun onFailRetry() {
                request()
            }

            override fun isAllowLoading(): Boolean {
                return !viewBinding.refreshLayout.isRefreshing
            }
        }).build()
        中 onload会一直加载。

如果使用helper.trailingLoadStateAdapter?.checkDisableLoadMoreIfNotFullPage();方法 ,则无法自动加载。 重现不中 只需要 把demo中的 activity_load_more.xml布局改成
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout android:id="@+id/refresh_layout" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/bg" android:orientation="vertical">

    <androidx.core.widget.NestedScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/rv_list"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:nestedScrollingEnabled="false"/>
    </androidx.core.widget.NestedScrollView>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>