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

不能添加多个HeaderView?我添加了多个只显示一个,然后一刷新就报错呢。 #4

Open
andansky opened this issue Aug 19, 2016 · 2 comments

Comments

@andansky
Copy link

java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionViewHolder{3f37ef34 position=8 id=-1, oldPos=2, pLpos:2 scrap [attachedScrap] tmpDetached no parent}
at android.support.v7.widget.RecyclerView$Recycler.validateViewHolderForOffsetPosition(RecyclerView.java:4801)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4932)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4913)
at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2029)
at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1414)
at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1377)
at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:578)
at android.support.v7.widget.RecyclerView.dispatchLayoutStep1(RecyclerView.java:3211)
at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3067)
at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3518)
at android.view.View.layout(View.java:16112)
at android.view.ViewGroup.layout(ViewGroup.java:5188)
at in.srain.cube.views.ptr.PtrFrameLayout.layoutChildren(PtrFrameLayout.java:260)
at in.srain.cube.views.ptr.PtrFrameLayout.onLayout(PtrFrameLayout.java:229)
at android.view.View.layout(View.java:16112)
at android.view.ViewGroup.layout(ViewGroup.java:5188)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1959)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1813)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1722)
at android.view.View.layout(View.java:16112)
at android.view.ViewGroup.layout(ViewGroup.java:5188)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:645)
at android.widget.FrameLayout.onLayout(FrameLayout.java:580)
at android.view.View.layout(View.java:16112)
at android.view.ViewGroup.layout(ViewGroup.java:5188)
at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1195)
at android.view.View.layout(View.java:16112)
at android.view.ViewGroup.layout(ViewGroup.java:5188)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:645)
at android.widget.FrameLayout.onLayout(FrameLayout.java:580)
at android.view.View.layout(View.java:16112)
at android.view.ViewGroup.layout(ViewGroup.java:5188)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1959)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1813)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1722)
at android.view.View.layout(View.java:16112)
at android.view.ViewGroup.layout(ViewGroup.java:5188)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:645)
at android.widget.FrameLayout.onLayout(FrameLayout.java:580)
at android.view.View.layout(View.java:16112)
at android.view.ViewGroup.layout(ViewGroup.java:5188)
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2549)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2236)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1333)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6712)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:800)
at android.view.Choreographer.doCallbacks(Choreographer.java:603)
at android.view.Choreographer.doFrame(Choreographer.java:572)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:786)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:192)
at android.app.ActivityThread.main(ActivityThread.java:5784)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1084)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.ja

@solartcc
Copy link
Member

目前仅支持单个Header/Footer

@andansky
Copy link
Author

在添加headerview的情况下调用resetData就报上面的错误了。

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

2 participants