java.lang.IllegalStateException: Layout state should be one of 100 but it is 10

Stack Overflow | Allen | 11 months ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to rafael . Or join the community to write better ones.
  1. 0
    samebug tip
    This issue was solved in 2.2.6. If updating doesn't solve, try using notifyItemRangeChanged(1, mDatas.size()) instead of notifyItemRangeChanged(0, mDatas.size()).
  2. 0
    samebug tip
    If you're using notifyItemChanged(position) try changing it for notifyDataSetChanged(). This could be a bug with notifyItemChanged. Try dispatching all events as soon as they happen as well, since RecyclerView already bundles the updates by default.
  3. 0
    samebug tip
    Also, you should dispatch events as soon as they happen, ReciclerView already bundles all updates.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    samebug tip
    This happens when you have android:animateLayoutChanges set to true in your XML file and you call notifyDataSetChanged(). To fix it, you have to set android:animateLayoutChanges to false.
  6. 0
    samebug tip
    This happens as well when you recycle a EditText when it has focus. Try setting android:focusableInTouchMode="true" on your RecycleView.

    2 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Layout state should be one of 100 but it is 10

      at android.support.v7.widget.RecyclerView$State.assertLayoutStep()
    2. Android v7
      RecyclerView.onLayout
      1. android.support.v7.widget.RecyclerView$State.assertLayoutStep(RecyclerView.java:10053)
      2. android.support.v7.widget.RecyclerView.dispatchLayoutStep3(RecyclerView.java:3045)
      3. android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:2917)
      4. android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3283)
      4 frames
    3. Android Platform
      ViewGroup.layout
      1. android.view.View.layout(View.java:13916)
      2. android.view.ViewGroup.layout(ViewGroup.java:4424)
      2 frames
    4. Android Support v4
      SwipeRefreshLayout.onLayout
      1. android.support.v4.widget.SwipeRefreshLayout.onLayout(SwipeRefreshLayout.java:596)
      1 frame
    5. Android Platform
      ViewGroup.layout
      1. android.view.View.layout(View.java:13916)
      2. android.view.ViewGroup.layout(ViewGroup.java:4424)
      3. android.widget.FrameLayout.onLayout(FrameLayout.java:448)
      4. android.view.View.layout(View.java:13916)
      5. android.view.ViewGroup.layout(ViewGroup.java:4424)
      5 frames
    6. Android v7
      ActionBarOverlayLayout.onLayout
      1. android.support.v7.internal.widget.ActionBarOverlayLayout.onLayout(ActionBarOverlayLayout.java:437)
      1 frame
    7. Android Platform
      ActivityThread.main
      1. android.view.View.layout(View.java:13916)
      2. android.view.ViewGroup.layout(ViewGroup.java:4424)
      3. android.widget.FrameLayout.onLayout(FrameLayout.java:448)
      4. android.view.View.layout(View.java:13916)
      5. android.view.ViewGroup.layout(ViewGroup.java:4424)
      6. android.widget.LinearLayout.setChildFrame(LinearLayout.java:1655)
      7. android.widget.LinearLayout.layoutVertical(LinearLayout.java:1513)
      8. android.widget.LinearLayout.onLayout(LinearLayout.java:1426)
      9. android.view.View.layout(View.java:13916)
      10. android.view.ViewGroup.layout(ViewGroup.java:4424)
      11. android.widget.FrameLayout.onLayout(FrameLayout.java:448)
      12. android.view.View.layout(View.java:13916)
      13. android.view.ViewGroup.layout(ViewGroup.java:4424)
      14. android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2029)
      15. android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1850)
      16. android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1143)
      17. android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4667)
      18. android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
      19. android.view.Choreographer.doCallbacks(Choreographer.java:555)
      20. android.view.Choreographer.doFrame(Choreographer.java:525)
      21. android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
      22. android.os.Handler.handleCallback(Handler.java:615)
      23. android.os.Handler.dispatchMessage(Handler.java:92)
      24. android.os.Looper.loop(Looper.java:137)
      25. android.app.ActivityThread.main(ActivityThread.java:4960)
      25 frames
    8. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invokeNative(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:511)
      2 frames
    9. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
      2 frames
    10. Android Platform
      NativeStart.main
      1. dalvik.system.NativeStart.main(Native Method)
      1 frame