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

添加2个header就会导致报错 #354

Open
lileini opened this issue Jun 27, 2018 · 4 comments
Open

添加2个header就会导致报错 #354

lileini opened this issue Jun 27, 2018 · 4 comments

Comments

@lileini
Copy link

lileini commented Jun 27, 2018

java.lang.IllegalArgumentException: Called attach on a child which is not detached: ViewHolder{9acda11 position=1 id=-1, oldPos=-1, pLpos:-1 no parent} com.loyo.library.view.xrecyclerview.LoyoRecyclerView{159b65dc VFED.... ......ID 0,0-1080,1716 #7f0901c9 app:id/expandableListView_search}, adapter:com.jcodecraeer.xrecyclerview.XRecyclerView$WrapAdapter@305b96e5, layout:android.support.v7.widget.LinearLayoutManager@191735ba, context:com.loyo.oa.v2.project.activity.ProjectSearchOrPickerActivity@52be4b6
at android.support.v7.widget.RecyclerView$5.attachViewToParent(RecyclerView.java:810)
at android.support.v7.widget.ChildHelper.attachViewToParent(ChildHelper.java:239)
at android.support.v7.widget.RecyclerView$LayoutManager.addViewInt(RecyclerView.java:7984)
at android.support.v7.widget.RecyclerView$LayoutManager.addView(RecyclerView.java:7961)
at android.support.v7.widget.RecyclerView$LayoutManager.addView(RecyclerView.java:7949)
at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1570)
at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1516)
at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:608)
at android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3693)
at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3410)
at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3962)
at android.view.View.layout(View.java:15734)
at android.view.ViewGroup.layout(ViewGroup.java:5196)

@af913337456
Copy link
Member

是否使用了 1.5.9 版本?

@af913337456
Copy link
Member

是否是动态添加头部,还是静态添加?

@stonebirds
Copy link

这个问题在1.6.0之中解决了吗?

@stonebirds
Copy link

是否使用了 1.5.9 版本?

这个在1.6.0之中有修复吗???,我们现在的bugly上之前的旧代码也一直在摆这个错误,如果修复的话,我们就可以升级一下处理,否则还得替换

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

No branches or pull requests

3 participants