Giter Site home page Giter Site logo

Comments (6)

CymChad avatar CymChad commented on May 1, 2024

恩,我看看

from baserecyclerviewadapterhelper.

CymChad avatar CymChad commented on May 1, 2024

通常做法就是全部刷新一遍列表,然后在给当前view颜色,不需要知道之前的view吧?

from baserecyclerviewadapterhelper.

weavey avatar weavey commented on May 1, 2024

额 这样也是可以 但是 当我的列表数据很多的时候 这样会很耗性能的吧 建议最好是有一个根据position拿到item的view的方法 可能以后还会有其他情况需要(^o^)/

from baserecyclerviewadapterhelper.

CymChad avatar CymChad commented on May 1, 2024

notifyItemChanged(); 你可以使用这个方法改变postion的数据,通过数据属性去决定item的bg颜色,这样就是单独改一个,因为我看了下recycleView的源码,他没有把View的集合给暴露,如果自己去存View的话,感觉不太好,所以尽量用原始的方法。

from baserecyclerviewadapterhelper.

weavey avatar weavey commented on May 1, 2024

嗯 recyclerview没有这样方法就没办法了 主要问题在于我数据的实体类里面 没有一个属性是可以用来判断改变view的背景 这样的话我要重新打包数据或者记录每个item的标志 最近一直在用你的这个万能Adapter 感觉非常不错!强!

from baserecyclerviewadapterhelper.

CymChad avatar CymChad commented on May 1, 2024

感谢使用,有什么问题可以继续提出

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.