关于吸顶效果设置后无效的问题
18640243061 opened this issue · 1 comments
18640243061 commented
我在布局中使用了这个控件,但是给recyclerview设置吸顶属性并没有效果滑动依然会滑出屏幕,这个布局是fragment中的以下是布局文件
`
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/sw_refresh"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:overScrollMode="never"
android:scrollbars="none"
app:srlEnableNestedScrolling="true">
<com.scwang.smart.refresh.header.ClassicsHeader
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/view_include"
android:fillViewport="true"
android:overScrollMode="never"
android:scrollbars="none">
<com.donkingliang.consecutivescroller.ConsecutiveScrollerLayout
android:id="@+id/scale_refresh"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:overScrollMode="never"
android:scrollbars="vertical"
app:autoAdjustHeightAtBottomView="true">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.stx.xhb.androidx.XBanner
android:id="@+id/banner"
android:layout_width="match_parent"
android:layout_height="375dp"
app:pointNormal="@drawable/xbanner_select_normal"
app:pointSelect="@drawable/xbanner_select_point"
app:pointTopBottomPadding="13dp" />
<RelativeLayout
android:id="@+id/rl_search"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="14dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="14dp"
android:background="@mipmap/icon_search_bg_d">
<ImageView
android:id="@+id/iv_flag"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginStart="88dp"
android:src="@mipmap/icon_search_small" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginStart="5dp"
android:layout_toEndOf="@id/iv_flag"
android:text="专题、文章、活动、商品"
android:textSize="13sp" />
</RelativeLayout>
</RelativeLayout>
<LinearLayout
android:id="@+id/ll_root_jgq"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.viewpager.widget.ViewPager
android:id="@+id/view_vp"
android:layout_width="match_parent"
android:layout_height="210dp" />
<LinearLayout
android:id="@+id/indicatorLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:gravity="center"
android:orientation="horizontal">
<!-- 这里的指示器通过动态添加 -->
</LinearLayout>
</LinearLayout>
<Space
android:layout_width="wrap_content"
android:layout_height="20dp" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_headline"
android:layout_width="match_parent"
android:layout_height="40dp"
android:overScrollMode="never"
android:scrollbars="none"
tools:itemCount="2" />
<Space
android:layout_width="wrap_content"
android:layout_height="20dp" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_hor_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:overScrollMode="never"
android:scrollbars="none" />
<Space
android:layout_width="wrap_content"
android:layout_height="11dp" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_tag"
android:layout_width="match_parent"
android:layout_height="35dp"
android:background="#FFFFFF"
android:overScrollMode="never"
android:scrollbars="none"
app:layout_isSticky="true" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_goods"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#F8F8F8"
android:overScrollMode="never"
android:paddingStart="4dp"
android:paddingEnd="4dp"
android:scrollbars="none" />
</com.donkingliang.consecutivescroller.ConsecutiveScrollerLayout>
</androidx.core.widget.NestedScrollView>
<com.scwang.smart.refresh.footer.ClassicsFooter
android:layout_width="match_parent"
android:layout_height="match_parent" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
<RelativeLayout
android:id="@+id/include_root_view"
android:layout_width="match_parent"
android:layout_height="48dp">
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true" />
<ImageView
android:id="@+id/iv_back"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerVertical="true"
android:paddingStart="20dp"
android:paddingEnd="20dp"
android:src="@mipmap/icon_back" />
<ImageView
android:id="@+id/iv_share"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentEnd="true"
android:paddingStart="20dp"
android:paddingEnd="20dp"
android:src="@mipmap/icon_omit_share" />
</RelativeLayout>
`
donkingliang commented
ConsecutiveScrollerLayout不用嵌套在NestedScrollView里