Comments (4)
在已经加入adapter的情况下,setLoadingMoreEnabled为false之后是不是得notify一下?
报了这个bug 每次的position 都是item数量+1. 看了下源码 是不是在没有更多数据时,setLoadingMoreEnabled为false之后notify一下就可以解决?
Fatal Exception: java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionViewHolder{dddcd60 position=8 id=-1, oldPos=-1, pLpos:-1 no parent} com.jcodecraeer.xrecyclerview.XRecyclerView{529c22e VFED..... ........ 0,0-720,1218 #7f09054a app:id/a8u}, adapter:com.jcodecraeer.xrecyclerview.XRecyclerView$d@76ec3eb,
at android.support.v7.widget.RecyclerView$Recycler.validateViewHolderForOffsetPosition(RecyclerView.java:5715)
解决了吗?
from xrecyclerview.
在已经加入adapter的情况下,setLoadingMoreEnabled为false之后是不是得notify一下?
报了这个bug 每次的position 都是item数量+1. 看了下源码 是不是在没有更多数据时,setLoadingMoreEnabled为false之后notify一下就可以解决?
Fatal Exception: java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionViewHolder{dddcd60 position=8 id=-1, oldPos=-1, pLpos:-1 no parent} com.jcodecraeer.xrecyclerview.XRecyclerView{529c22e VFED..... ........ 0,0-720,1218 #7f09054a app:id/a8u}, adapter:com.jcodecraeer.xrecyclerview.XRecyclerView$d@76ec3eb,
at android.support.v7.widget.RecyclerView$Recycler.validateViewHolderForOffsetPosition(RecyclerView.java:5715)解决了吗?
好了,就是在这个setLoadingMoreEnable之后notify一下就行,setLoadingMoreEnabled相当于改变了adapter的数据。
from xrecyclerview.
在已经加入adapter的情况下,setLoadingMoreEnabled为false之后是不是得notify一下?
报了这个bug 每次的position 都是item数量+1. 看了下源码 是不是在没有更多数据时,setLoadingMoreEnabled为false之后notify一下就可以解决?
Fatal Exception: java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionViewHolder{dddcd60 position=8 id=-1, oldPos=-1, pLpos:-1 no parent} com.jcodecraeer.xrecyclerview.XRecyclerView{529c22e VFED..... ........ 0,0-720,1218 #7f09054a app:id/a8u}, adapter:com.jcodecraeer.xrecyclerview.XRecyclerView$d@76ec3eb,
at android.support.v7.widget.RecyclerView$Recycler.validateViewHolderForOffsetPosition(RecyclerView.java:5715)解决了吗?
好了,就是在这个setLoadingMoreEnable之后notify一下就行,setLoadingMoreEnabled相当于改变了adapter的数据。
你这个bug是必现的吗?为你的读源码定位问题、分析问题的能力点赞!我也试一下你的解决方案,但是我的crash好像不是必现,不太好判断对我是否有效。
from xrecyclerview.
在已经加入adapter的情况下,setLoadingMoreEnabled为false之后是不是得notify一下?
报了这个bug 每次的position 都是item数量+1. 看了下源码 是不是在没有更多数据时,setLoadingMoreEnabled为false之后notify一下就可以解决?
Fatal Exception: java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionViewHolder{dddcd60 position=8 id=-1, oldPos=-1, pLpos:-1 no parent} com.jcodecraeer.xrecyclerview.XRecyclerView{529c22e VFED..... ........ 0,0-720,1218 #7f09054a app:id/a8u}, adapter:com.jcodecraeer.xrecyclerview.XRecyclerView$d@76ec3eb,
at android.support.v7.widget.RecyclerView$Recycler.validateViewHolderForOffsetPosition(RecyclerView.java:5715)
- 继承LinearLayoutManager
- The best solution is, clear the list every time before refresh RecyclerView.
第2个解决方案本质上和你的一样吗?
from xrecyclerview.
Related Issues (20)
- com.jcodecraeer:xrecyclerview:1.5.9 获取不到 HOT 2
- java.lang.IllegalStateException: ViewHolder views must not be attached when created. Ensure that you are not passing 'true' to the attachToRoot parameter of LayoutInflater.inflate(..., boolean attachToRoot)
- 大哥,图都挂了
- 设置EmptyView方法 HOT 2
- 珍爱生命,远离此框架!
- 代码规范的问题
- 请尽快支持androidx, 谢谢 HOT 3
- 建议
- 当XRecyclerView 添加超过两个headers 将触发 IllegalStateException: ViewHolder views must not be attached when created.
- Loadmore not trigger when put the XRecylerview inside PullRefreshlayout
- setFootView callback字段没有必要必填吧,我看下面调用的地方都有判空
- setNoMore(true) 未正常生效 HOT 1
- Loader view while retrieving list
- 麻烦适配安卓x HOT 3
- 上拉刷新为什么没有视觉效果 HOT 1
- )))
- 下拉刷新文字显示问题
- notifyItemRemoved(listData,pos) 这个API不友好不合理
- 使用XRecyclerView添加header同时addItemDecoration遇到的问题,他会在header上面也加一个Decoration
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 xrecyclerview.