UiStatus icon indicating copy to clipboard operation
UiStatus copied to clipboard

结合SmartRefreshLayout使用绑定无效

Open idzyr opened this issue 3 years ago • 1 comments

SmartRefreshLayout https://github.com/scwang90/SmartRefreshLayout


按找你在简书上所说的绑定方式在空数据或者错误页面实现下拉刷新的功能 使用SmartRefreshLayout作为下拉刷新控件,绑定到RecyclerView但是绑定后什么也不显示

xml布局

<?xml version="1.0" encoding="utf-8"?>
<com.scwang.smart.refresh.layout.SmartRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/installed_refresh"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

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

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

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

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

idzyr avatar Jan 14 '22 12:01 idzyr

使用Google的Swiperefreshlayout组件也会出现此问题

idzyr avatar Jan 24 '22 14:01 idzyr