Closed yyt231 closed 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不吸顶,有加载更多的冲突
嵌套NestedScrollView,吸顶功能是会失效的。不嵌套NestedScrollView是可以的。我不知道你说的加载更多的冲突,具体表现是什么?我用demo里的吸顶页面加上SmartRefreshLayout加载更多是正常的,并没有发现问题。
不嵌套NestedScrollView可以吸顶,但有加载更多的冲突。 使用NestedScrollView不吸顶,有加载更多的冲突