E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.etwinklesolutions.coronavirusanalytics, PID: 13433
java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionRowHeaderViewHolder{c48018a position=187 id=-1, oldPos=112, pLpos:112 scrap [attachedScrap] tmpDetached no parent} com.evrencoskun.tableview.adapter.recyclerview.CellRecyclerView{65e247c VFED..... ......I. 0,96-300,948}, adapter:com.evrencoskun.tableview.adapter.recyclerview.RowHeaderRecyclerViewAdapter@beed079, layout:androidx.recyclerview.widget.LinearLayoutManager@ec9d1be, context:com.etwinklesolutions.coronavirusanalytics.MainActivity@7da1974
at androidx.recyclerview.widget.RecyclerView$Recycler.validateViewHolderForOffsetPosition(RecyclerView.java:5974)
at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6158)
at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6118)
at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6114)
at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2303)
at androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1627)
at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1587)
at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:665)
at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep1(RecyclerView.java:4085)
at androidx.recyclerview.widget.RecyclerView.onMeasure(RecyclerView.java:3534)
at android.view.View.measure(View.java:24955)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7149)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at android.view.View.measure(View.java:24955)
at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:715)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:461)
at android.view.View.measure(View.java:24955)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7149)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at android.view.View.measure(View.java:24955)
at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:715)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:461)
at android.view.View.measure(View.java:24955)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7149)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at androidx.appcompat.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:143)
at android.view.View.measure(View.java:24955)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7149)
at androidx.appcompat.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:401)
at android.view.View.measure(View.java:24955)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7149)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at android.view.View.measure(View.java:24955)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7149)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1535)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:825)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:704)
at android.view.View.measure(View.java:24955)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7149)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at com.android.internal.policy.DecorView.onMeasure(DecorView.java:1029)
at android.view.View.measure(View.java:24955)
at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:3338)
at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:2067)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2366)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1927)
E/AndroidRuntime: at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8558)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:949)
at android.view.Choreographer.doCallbacks(Choreographer.java:761)
at android.view.Choreographer.doFrame(Choreographer.java:696)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:935)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7094)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)
Hi @Dulajdeshan,
Which version of the library are you using?
I was not able to reproduce this issue in the sample app of v0.8.9 (I clicked repeatedly on the corner to sort the table).
Could someone help me to fix this?