Comments (6)
恩,我看看
from baserecyclerviewadapterhelper.
通常做法就是全部刷新一遍列表,然后在给当前view颜色,不需要知道之前的view吧?
from baserecyclerviewadapterhelper.
额 这样也是可以 但是 当我的列表数据很多的时候 这样会很耗性能的吧 建议最好是有一个根据position拿到item的view的方法 可能以后还会有其他情况需要(^o^)/
from baserecyclerviewadapterhelper.
notifyItemChanged(); 你可以使用这个方法改变postion的数据,通过数据属性去决定item的bg颜色,这样就是单独改一个,因为我看了下recycleView的源码,他没有把View的集合给暴露,如果自己去存View的话,感觉不太好,所以尽量用原始的方法。
from baserecyclerviewadapterhelper.
嗯 recyclerview没有这样方法就没办法了 主要问题在于我数据的实体类里面 没有一个属性是可以用来判断改变view的背景 这样的话我要重新打包数据或者记录每个item的标志 最近一直在用你的这个万能Adapter 感觉非常不错!强!
from baserecyclerviewadapterhelper.
感谢使用,有什么问题可以继续提出
from baserecyclerviewadapterhelper.
Related Issues (20)
- 4.0版本,HeaderView和TrailingLoadStateAdapter再GridLayoutManager中展示样式错误 HOT 3
- 空布局的和脚布局问题
- 滑动到底部,并执行adapter.notifyItemChanged(position)会自动往上滚动一段距离 HOT 2
- 多布局类型的Adapter(BaseMultiItemAdapter)要如何实现自定义的上拉加载和下拉刷新呢
- 最新的版本里面的kotlin版本太高怎么向下兼容 HOT 3
- basenodeadapter fun nodeSetData(parentNode: BaseNode, childIndex: Int, data: BaseNode) 里面的childindex如何获取
- 多类型和diffadapter 可以同时使用? HOT 1
- 支持网格拖拽
- 3.0.6 版本找不到getLayoutPosition 方法,尝试升级库版本无效 HOT 2
- .
- StateView的占用高度(宽度)似乎存在BUG HOT 4
- BaseDifferAdapter和LoadMore一起使用会有问题
- 拖拽问题
- 部分机型拖拽被重叠。
- 关于使用BaseBinderAdapter+LoadMoreModule接口+adapter.addData(list)实现上划加载更多的实现模式下,只能加载一页后面就不加载的问题
- 头部更多,页面初始化,没有手动下拉滑动,QuickAdapterHelper setLeadingLoadStateAdapter为何会自动加载更多?
- 无法上拉刷新,能出个demo吗
- NestedScrollView+嵌套+RecyclerView问题
- 设置空布局,一开始list有数据,没问题,后来在刷新数据后list成为空列表,再次submitList会闪退 HOT 2
- 4.1.4 代码可以增加下list嵌套的例子吗? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from baserecyclerviewadapterhelper.