Skip to content

结合SmartRefreshLayout使用绑定无效 #13

Description

@idzyr

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions