donkingliang / GroupedRecyclerViewAdapter

GroupedRecyclerViewAdapter可以很方便的实现RecyclerView的分组显示,并且每个组都可以包含组头、组尾和子项;可以方便实现多种Type类型的列表,可以实现如QQ联系人的列表一样的列表展开收起功能,还可以实现头部悬浮吸顶功能等。
Apache License 2.0
1.65k stars 216 forks source link

滑动冲突的问题 #70

Closed yyt231 closed 3 years ago

yyt231 commented 3 years ago
  <com.scwang.smart.refresh.layout.SmartRefreshLayout
            android:id="@+id/srl_report"
            android:layout_width="match_parent"
            android:layout_height="match_parent"

            android:layout_weight="1">

            <com.scwang.smart.refresh.header.ClassicsHeader
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />
            <!-- 用StickyHeaderLayout包裹RecyclerView -->

            <androidx.core.widget.NestedScrollView

                android:layout_width="match_parent"
                android:layout_height="match_parent">

                <com.donkingliang.groupedadapter.widget.StickyHeaderLayout
                    android:id="@+id/sticky_layout"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent">

                    <androidx.recyclerview.widget.RecyclerView
                        android:id="@+id/recycleView"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent" />

                </com.donkingliang.groupedadapter.widget.StickyHeaderLayout>
            </androidx.core.widget.NestedScrollView>

            <com.scwang.smart.refresh.footer.ClassicsFooter
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />

        </com.scwang.smart.refresh.layout.SmartRefreshLayout>

不嵌套NestedScrollView可以吸顶,但有加载更多的冲突。 使用NestedScrollView不吸顶,有加载更多的冲突

donkingliang commented 3 years ago

嵌套NestedScrollView,吸顶功能是会失效的。不嵌套NestedScrollView是可以的。我不知道你说的加载更多的冲突,具体表现是什么?我用demo里的吸顶页面加上SmartRefreshLayout加载更多是正常的,并没有发现问题。