Giter Site home page Giter Site logo

Comments (17)

CymChad avatar CymChad commented on May 1, 2024

我建议你可以这样试试,setEmptyView后然后用adapter.notifyDataSetChanged();。

from baserecyclerviewadapterhelper.

weavey avatar weavey commented on May 1, 2024

这样试过了,也是没效果

from baserecyclerviewadapterhelper.

CymChad avatar CymChad commented on May 1, 2024

行,我这边看下有什么好的解决方案。

from baserecyclerviewadapterhelper.

weavey avatar weavey commented on May 1, 2024

可以 加油 ( ̄︶ ̄)

from baserecyclerviewadapterhelper.

CymChad avatar CymChad commented on May 1, 2024

mQuickAdapter.notifyItemChanged(0);

from baserecyclerviewadapterhelper.

CymChad avatar CymChad commented on May 1, 2024

这样可以,我刚试过

from baserecyclerviewadapterhelper.

weavey avatar weavey commented on May 1, 2024

可以 我试一下

from baserecyclerviewadapterhelper.

weavey avatar weavey commented on May 1, 2024

可以 行 再次感谢一下大神!!!

from baserecyclerviewadapterhelper.

CymChad avatar CymChad commented on May 1, 2024

那我就关闭bug了哦

from baserecyclerviewadapterhelper.

weavey avatar weavey commented on May 1, 2024

好像还有问题 第三次setEmptyView 又没效果了

from baserecyclerviewadapterhelper.

CymChad avatar CymChad commented on May 1, 2024

解决了吗?

from baserecyclerviewadapterhelper.

weavey avatar weavey commented on May 1, 2024

没有。。。 notifyItemChanged(0),为什么第三次setemptyView就无效了。我的写法是这样的
实例化Adapter的时候 就直接传了空的list进去,然后开始从后台拿数据,这时候setEmptyView,传了一个正在加载的view进去。访问后台成功后,发现数据为空,再setEmptyView(),传一个表示无数据的view,这时候用notifyItemChanged(0)有效。后面重新访问网络,我再setEmptyView(),让正在加载重新显示出来,这时候就无效了,emptyView还是第二次传的那个无数据的view。

from baserecyclerviewadapterhelper.

CymChad avatar CymChad commented on May 1, 2024

哦,我这边再看看。

from baserecyclerviewadapterhelper.

CymChad avatar CymChad commented on May 1, 2024

我试了下,确实只能两种不同的布局切换,我怀疑是RecyclerView,缓存的问题。由于这是RecyclerView的原始API所以我这边也不好修改。

from baserecyclerviewadapterhelper.

CymChad avatar CymChad commented on May 1, 2024

实在不好意思。没有能帮助到你。

from baserecyclerviewadapterhelper.

weavey avatar weavey commented on May 1, 2024

没事没事 老是麻烦你帮忙看问题我都不好意思 确定问题出在哪才关键 那只能再寻找别的方法替代

from baserecyclerviewadapterhelper.

CymChad avatar CymChad commented on May 1, 2024

恩,可以重新set adapter。

from baserecyclerviewadapterhelper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.