SmartRefreshLayout 禁用refresh(代码app:srlEnableRefresh="false")后,下拉动作失效

snz8szmq  于 2个月前  发布在  其他
关注(0)|答案(1)|浏览(30)

关键代码:
<com.scwang.smartrefresh.layout.SmartRefreshLayout
android:id="@+id/smart_refresh_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:srlEnableRefresh="false">

<LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/rcy_data_list"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:paddingStart="@dimen/dp_17"
            android:paddingEnd="@dimen/dp_17"
            android:scrollbars="none"
            tools:itemCount="8"
            tools:listitem="@layout/item_user_active_recycler_layout" />

    </LinearLayout>

    <com.scwang.smartrefresh.layout.footer.ClassicsFooter
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:srlAccentColor="@color/white" />

</com.scwang.smartrefresh.layout.SmartRefreshLayout>

布局这样子设置后,手指放在RecyclerView内容区域外,无法将整个SmartRefreshLayout往下拉下去

unguejic

unguejic1#

解决了,将布局中的LinearLayout,高度设置为match_parent,就可以拉下去了

相关问题