Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapter 中notifyItemRemoved()报错 #108

Closed
wujuan opened this issue Jul 29, 2016 · 7 comments
Closed

Adapter 中notifyItemRemoved()报错 #108

wujuan opened this issue Jul 29, 2016 · 7 comments

Comments

@wujuan
Copy link

wujuan commented Jul 29, 2016

删除列表中的首末条目时:java.lang.IllegalArgumentException: Called attach on a child which is not detached ViewHolder{41cede38 position=7 id=-1, oldPos=-1, pLpos:-1}
烦解

@wuruize
Copy link

wuruize commented Jul 31, 2016

我也是

@initzf
Copy link

initzf commented Dec 29, 2016

@wuruize @wujuan 我做删除的时候也遇上这个问题了,你们怎么解决的啊。

@ldqmaybe
Copy link

我做删除的时候也遇上这个问题了,你们怎么解决的啊。

@jiawei-i
Copy link

是不是增加了headerview 减掉headerview个数和刷新的那个个数。如果没有加headerview就减掉刷新的布局个数也就是减掉1。

@ldqmaybe
Copy link

@jiawei-i 这样做是没错,但是好像使用notifyItemRemoved(position)不起列表刷新作用,不知道你的会不会这样?如果使用notifyDataSetChanged()又没有动画效果。

@af913337456
Copy link
Member

已修复,见最近的 commit ,2017-11-14

@4332weizi
Copy link

我在用1.5.9,依旧有这个问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants