Comments (6)
这个都是调用RecyclerView原生的方法。
from baserecyclerviewadapterhelper.
public void addData(List data) {
this.mData.addAll(data); //我是说对mData的操作
notifyDataSetChanged();
}
from baserecyclerviewadapterhelper.
mData就是你自己的数组,这也是原始的,没做过任何处理。
from baserecyclerviewadapterhelper.
这个不加锁是没有问题的,因为不会涉及到多线程操作。
from baserecyclerviewadapterhelper.
@zeng1990java 有可能会涉及到吧。一个场景,支持用户对列表数据删除,同时后台策略接收服务端推送数据对列表数据做删改 @CymChad
from baserecyclerviewadapterhelper.
但是方法调用还是会回到主线程操作吧,不然notifyDataSetChanged();就报错了
from baserecyclerviewadapterhelper.
Related Issues (20)
- 为什么Android studio 点进库的源码里看不到原始代码,只能看到反编译的代码 HOT 8
- 能否提供一个jar 或者 aar 包,我可以为.net 平台上编译一个包供 .net 社区使用? HOT 1
- 调用notifyDataSetChanged时,adapter.stateView的任何改变都不会生效 HOT 6
- 数据源为List时,调用add方法程序闪退 HOT 1
- 同时依赖 3.0.14 和 4.1.1 报错 HOT 1
- 4.0版本如何获取Item中Seekbar控件? HOT 1
- BaseNodeAdapter如何准确获取父node的下标
- 设置setStateViewLayout后,当有数据加载到RecyclerView时显示不全 HOT 3
- LayoutAnimationBinding 是啥? HOT 1
- 作者可以给3.0.14新迭代一个版本吗,给拖拽排序功能中,开放getMovementFlags出来,可以实现某个类型(或特殊数据所在项)数据禁止拖拽,谢谢, HOT 1
- 版本4.1.3 使用 ConcatAdapter+BaseSingleItemAdapter时EditText重复创建 HOT 3
- 真是烂尾, 白忙活一天 HOT 9
- 3.0.14,无法使用BaseDifferAdapter ,是必须要升级4.0版本才能用吗?请教大佬有没有别的兼容方式,升级4.0项目改动的地方比较多
- 2.9.46 版本有个crash,不知道作者遇到过吗,在新版是否已经解决
- BaseQuickAdapter继承传入泛型VH,以便使用RecyclerView重载方法onViewAttachedToWindow、onViewRecycled等 HOT 1
- 4.1.2 加载更多问题
- 设置 空 view 不显示 HOT 25
- 如何获取操作数据集合? HOT 1
- 使用咨询,3.x和4.x版本可以同时存在吗? HOT 1
- 4.0版本,HeaderView和TrailingLoadStateAdapter再GridLayoutManager中展示样式错误 HOT 3
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.