scwang90 / SmartRefreshLayout

🔥下拉刷新、上拉加载、二级刷新、淘宝二楼、RefreshLayout、OverScroll,Android智能下拉刷新框架,支持越界回弹、越界拖动,具有极强的扩展性,集成了几十种炫酷的Header和 Footer。
https://segmentfault.com/a/1190000010066071
Apache License 2.0
24.8k stars 4.93k forks source link

禁用下啦刷新功能无效 #1420

Open HZKQ opened 2 years ago

HZKQ commented 2 years ago

版本:2.0.3 调用:

java代码:

refreshLayout = findViewById(R.id. refresh);
refreshLayout.setEnableRefresh(false);

布局:

    <com.scwang.smart.refresh.layout.SmartRefreshLayout
        android:id="@+id/refresh"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/colorWhite">

        <com.scwang.smart.refresh.header.MaterialHeader
            android:layout_width="match_parent"
            android:layout_height="150px"
            app:srlFinishDuration="200" />

        <com.yanzhenjie.recyclerview.SwipeRecyclerView
            android:id="@+id/rv"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:overScrollMode="never"
            app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
            tools:itemCount="10"
            tools:listitem="@layout/rv_item_device_group" />

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

结果: 还是能手动下拉刷新。

预期结果: 不让手动下拉刷新了。