IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter notifyItemRangeRemove
来源:互联网 发布:横道图绘制软件 编辑:程序博客网 时间:2024/05/16 19:02
发现出现此bug的原因是我调用了recycleview的adapter的此方法
adapter.notifyItemRangeRemoved(min,itemCount);
经过测试发现,如果一次性移除所有的孩子就会抛出上面的异常,
最后发现当你移除所有子view的时候调用下面的方法可以避免
adapter.notifyDataSetChanged()//记得移除adapter中的数据
0 0
- IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter notifyItemRangeRemove
- RecyclerView:IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter
- 解决IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter
- java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionVie
- IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionViewHolder
- RecyclerView Bug:IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter的解决方案
- RecyclerView Bug:IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter的解决方案
- RecyclerView Bug:IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter的解决方案
- ndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter的解决方案
- 关于Recycleview的Inconsistency detected. Invalid view holder adapter positionViewHolder
- RecyclerView异常:Inconsistency detected. Invalid view holder adapter positionViewHolder
- IndexOutOfBoundsException: Inconsistency detected. Invalid item position
- IndexOutOfBoundsException: Inconsistency detected. Invalid item position
- IndexOutOfBoundsException: Inconsistency detected. Invalid item position
- RecyclerView Bug:IndexOutOfBoundsException: Inconsistency detected. Invalid item position 解决方案
- RecyclerView Bug:IndexOutOfBoundsException: Inconsistency detected. Invalid item position …
- RecyclerView Bug:IndexOutOfBoundsException: Inconsistency detected. Invalid item position
- RecyclerView Bug:IndexOutOfBoundsException: Inconsistency detected. Invalid item position
- 在Ubuntu16.04中配置Anaconda(Python2.7)以支持Spark2.0(Pyspark)
- Spring Bean常用扩展接口
- 16G内存显示15.9G可用的解法
- [BZOJ2653]middle(二分+主席树)
- c程序
- IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter notifyItemRangeRemove
- C++ 菱形继承问题 虚继承和虚基类
- 在Fedora 25中更换openjdk为oracle jdk
- Codeforces 667C Reberland Linguistics dp+set
- 1.Two Sum
- 字符串中最长子串
- CentOS 安装 SonaType Nexus Maven Repository以及旧库迁移
- Android Material Design之CoordinatorLayout
- java-监听器使用的例子